diff --git a/tests/cases/compiler/omitTypeTestErrors01.ts b/tests/cases/compiler/omitTypeTestErrors01.ts new file mode 100644 index 0000000000000..fd3f5fc1e5d2a --- /dev/null +++ b/tests/cases/compiler/omitTypeTestErrors01.ts @@ -0,0 +1,19 @@ +// @declaration: true + +interface Foo { + a: string; + b: number; + c: boolean; +} + +export type Bar = Omit; +export type Baz = Omit; + +export function getBarC(bar: Bar) { + return bar.c; +} + +export function getBazB(baz: Baz) { + return baz.b; +} + diff --git a/tests/cases/compiler/omitTypeTests01.ts b/tests/cases/compiler/omitTypeTests01.ts new file mode 100644 index 0000000000000..d3b2ce26e1ec4 --- /dev/null +++ b/tests/cases/compiler/omitTypeTests01.ts @@ -0,0 +1,19 @@ +// @declaration: true + +interface Foo { + a: string; + b: number; + c: boolean; +} + +export type Bar = Omit; +export type Baz = Omit; + +export function getBarA(bar: Bar) { + return bar.a; +} + +export function getBazA(baz: Baz) { + return baz.a; +} +