swc/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicates02.ts

15 lines
268 B
TypeScript

// @declaration: true
// @module: commonjs
export interface Foo {
a: string;
b: number;
c: boolean;
}
export const obj = {
m(): this is Foo {
let dis = this as {} as Foo;
return dis.a != null && dis.b != null && dis.c != null;
}
}