mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
39 lines
889 B
TypeScript
39 lines
889 B
TypeScript
//// [tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName02.ts] ////
|
|
|
|
//// [declarationEmitThisPredicatesWithPrivateName02.ts]
|
|
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;
|
|
}
|
|
}
|
|
|
|
//// [declarationEmitThisPredicatesWithPrivateName02.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.obj = void 0;
|
|
exports.obj = {
|
|
m() {
|
|
let dis = this;
|
|
return dis.a != null && dis.b != null && dis.c != null;
|
|
}
|
|
};
|
|
|
|
|
|
//// [declarationEmitThisPredicatesWithPrivateName02.d.ts]
|
|
interface Foo {
|
|
a: string;
|
|
b: number;
|
|
c: boolean;
|
|
}
|
|
export declare const obj: {
|
|
m(): this is Foo;
|
|
};
|
|
export {};
|