24 lines
380 B
JavaScript
24 lines
380 B
JavaScript
//// [symbolProperty28.ts]
|
|
class C1 {
|
|
[Symbol.toStringTag]() {
|
|
return { x: "" };
|
|
}
|
|
}
|
|
|
|
class C2 extends C1 { }
|
|
|
|
var c: C2;
|
|
var obj = c[Symbol.toStringTag]().x;
|
|
|
|
//// [symbolProperty28.js]
|
|
class C1 {
|
|
[Symbol.toStringTag]() {
|
|
return {
|
|
x: ""
|
|
};
|
|
}
|
|
}
|
|
class C2 extends C1 {
|
|
}
|
|
var c;
|
|
var obj = c[Symbol.toStringTag]().x;
|