diff --git a/tests/cases/compiler/omitTypeHelperModifiers01.ts b/tests/cases/compiler/omitTypeHelperModifiers01.ts new file mode 100644 index 0000000000000..da76173d3657f --- /dev/null +++ b/tests/cases/compiler/omitTypeHelperModifiers01.ts @@ -0,0 +1,22 @@ +// @strict: true + +type A = { + a: number; + b?: string; + readonly c: boolean; + d: unknown; +}; + +type B = Omit; + +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; +}