Skip to content

Commit 60e7b5d

Browse files
Added tests.
1 parent b010010 commit 60e7b5d

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// @declaration: true
2+
3+
interface Foo {
4+
a: string;
5+
b: number;
6+
c: boolean;
7+
}
8+
9+
export type Bar = Omit<Foo, "c">;
10+
export type Baz = Omit<Foo, "b" | "c">;
11+
12+
export function getBarC(bar: Bar) {
13+
return bar.c;
14+
}
15+
16+
export function getBazB(baz: Baz) {
17+
return baz.b;
18+
}
19+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// @declaration: true
2+
3+
interface Foo {
4+
a: string;
5+
b: number;
6+
c: boolean;
7+
}
8+
9+
export type Bar = Omit<Foo, "c">;
10+
export type Baz = Omit<Foo, "b" | "c">;
11+
12+
export function getBarA(bar: Bar) {
13+
return bar.a;
14+
}
15+
16+
export function getBazA(baz: Baz) {
17+
return baz.a;
18+
}
19+

0 commit comments

Comments
 (0)