Added test.

This commit is contained in:
Daniel Rosenwasser 2019-05-01 13:57:47 -07:00
parent c9eb846094
commit 60962a8709

View File

@ -0,0 +1,22 @@
// @strict: true
type A = {
a: number;
b?: string;
readonly c: boolean;
d: unknown;
};
type B = Omit<A, 'a'>;
function f(x: B) {
const b = x.b;
x.b = "hello";
x.b = undefined;
const c = x.c;
x.c = true;
const d = x.d;
x.d = d;
}