18 lines
330 B
TypeScript
18 lines
330 B
TypeScript
//// [ES5SymbolProperty4.ts]
|
|
var Symbol: { iterator: string };
|
|
|
|
class C {
|
|
[Symbol.iterator]() { }
|
|
}
|
|
|
|
(new C)[Symbol.iterator]
|
|
|
|
//// [ES5SymbolProperty4.js]
|
|
var Symbol;
|
|
var C = (function () {
|
|
function C() {
|
|
}
|
|
C.prototype[Symbol.iterator] = function () { };
|
|
return C;
|
|
})();
|
|
(new C)[Symbol.iterator];
|