super(); }! protected methodFoo() { }! private property: number = 1;! public static methodFoo() { }! private static property = 1;! public get getter() {}! public set setter(value: any) {}! public get set prop() {}! private readonly immutableProp: string = 'a';! }!
function test(m: Test) {! switch (m) {! case Test.KEY_1:! return 'key1';! case Test.KEY_2:! return 'key2';! default;! const check: never = m;! // error Test.KEY_3 is not assignable to never.! }! }!
y = 1;! export interface A {! [x]: string;! [y]: string;! // error: Interface 'A' has or is using private name '[y]' ! // (when using --declaration)! }!