Added tests.

This commit is contained in:
Daniel Rosenwasser 2019-04-24 16:43:17 -07:00
parent b0100100a1
commit 60e7b5d17e
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// @declaration: true
interface Foo {
a: string;
b: number;
c: boolean;
}
export type Bar = Omit<Foo, "c">;
export type Baz = Omit<Foo, "b" | "c">;
export function getBarC(bar: Bar) {
return bar.c;
}
export function getBazB(baz: Baz) {
return baz.b;
}

View File

@ -0,0 +1,19 @@
// @declaration: true
interface Foo {
a: string;
b: number;
c: boolean;
}
export type Bar = Omit<Foo, "c">;
export type Baz = Omit<Foo, "b" | "c">;
export function getBarA(bar: Bar) {
return bar.a;
}
export function getBazA(baz: Baz) {
return baz.a;
}