TypeScript/tests/cases/compiler/omitTypeTestErrors01.ts
Daniel Rosenwasser 60e7b5d17e Added tests.
2019-04-24 16:43:17 -07:00

20 lines
277 B
TypeScript

// @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;
}