Skip to content

Commit 60962a8

Browse files
Added test.
1 parent c9eb846 commit 60962a8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// @strict: true
2+
3+
type A = {
4+
a: number;
5+
b?: string;
6+
readonly c: boolean;
7+
d: unknown;
8+
};
9+
10+
type B = Omit<A, 'a'>;
11+
12+
function f(x: B) {
13+
const b = x.b;
14+
x.b = "hello";
15+
x.b = undefined;
16+
17+
const c = x.c;
18+
x.c = true;
19+
20+
const d = x.d;
21+
x.d = d;
22+
}

0 commit comments

Comments
 (0)