File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {
38
38
s = arguments[i];
39
39
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
40
40
t[p] = s[p];
41
+ if (typeof Object.getOwnPropertySymbols === "function")
42
+ for (var i = 0, s = Object.getOwnPropertySymbols(s); i < s.length; i++)
43
+ t[i] = s[i];
41
44
}
42
45
return t;
43
46
};` ;
@@ -47,6 +50,9 @@ var __rest = (this && this.__rest) || function (s, e) {
47
50
var t = {};
48
51
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49
52
t[p] = s[p];
53
+ if (typeof Object.getOwnPropertySymbols === "function")
54
+ for (var i = 0, s = Object.getOwnPropertySymbols(s); i < s.length; i++) if (e.indexOf(s[i]) > 0)
55
+ t[i] = s[i];
50
56
return t;
51
57
};` ;
52
58
Original file line number Diff line number Diff line change @@ -428,7 +428,14 @@ namespace ts {
428
428
}
429
429
if ( isComputedPropertyName ( getPropertyName ( element ) ) ) {
430
430
// get the temp name and put that in there instead, like `_tmp + ""`
431
- propertyNames . push ( createBinary ( computedTempVariables . shift ( ) , SyntaxKind . PlusToken , createLiteral ( "" ) ) ) ;
431
+ const temp = computedTempVariables . shift ( ) ;
432
+ propertyNames . push ( createConditional ( createBinary ( createTypeOf ( temp ) ,
433
+ SyntaxKind . EqualsEqualsEqualsToken ,
434
+ createLiteral ( "symbol" ) ) ,
435
+ createToken ( SyntaxKind . QuestionToken ) ,
436
+ temp ,
437
+ createToken ( SyntaxKind . ColonToken ) ,
438
+ createBinary ( temp , SyntaxKind . PlusToken , createLiteral ( "" ) ) ) ) ;
432
439
}
433
440
else {
434
441
const propName = getTextOfPropertyName ( getPropertyName ( element ) ) ;
You can’t perform that action at this time.
0 commit comments