TypeScript/tests/baselines/reference/symbolDeclarationEmit12.js

35 lines
926 B
JavaScript
Raw Normal View History

2015-02-07 05:49:58 +01:00
//// [symbolDeclarationEmit12.ts]
module M {
interface I { }
export class C {
[Symbol.iterator]: I;
[Symbol.toPrimitive](x: I) { }
[Symbol.isConcatSpreadable](): I {
return undefined
}
get [Symbol.isRegExp]() { return undefined; }
set [Symbol.isRegExp](x: I) { }
}
}
//// [symbolDeclarationEmit12.js]
var M;
(function (M) {
var C = (function () {
function C() {
}
2015-02-07 06:38:53 +01:00
C.prototype[Symbol.toPrimitive] = function (x) { };
2015-02-07 05:49:58 +01:00
C.prototype[Symbol.isConcatSpreadable] = function () {
return undefined;
};
Object.defineProperty(C.prototype, Symbol.isRegExp, {
2015-02-21 23:43:45 +01:00
get: function () { return undefined; },
2015-02-07 06:38:53 +01:00
set: function (x) { },
2015-02-07 05:49:58 +01:00
enumerable: true,
configurable: true
});
return C;
})();
M.C = C;
})(M || (M = {}));