mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
22 lines
533 B
TypeScript
22 lines
533 B
TypeScript
//// [tests/cases/conformance/types/primitives/boolean/extendBooleanInterface.ts] ////
|
|
|
|
//// [extendBooleanInterface.ts]
|
|
interface Boolean {
|
|
doStuff(): string;
|
|
doOtherStuff<T>(x: T): T;
|
|
}
|
|
|
|
var x = true;
|
|
var a: string = x.doStuff();
|
|
var b: string = x.doOtherStuff('hm');
|
|
var c: string = x['doStuff']();
|
|
var d: string = x['doOtherStuff']('hm');
|
|
|
|
//// [extendBooleanInterface.js]
|
|
"use strict";
|
|
var x = true;
|
|
var a = x.doStuff();
|
|
var b = x.doOtherStuff('hm');
|
|
var c = x['doStuff']();
|
|
var d = x['doOtherStuff']('hm');
|