Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions lib/tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10486,6 +10486,7 @@ var ts;
var hasAsyncFunctions;
var hasDecorators;
var hasParameterDecorators;
var hasJsxSpreadAttribute;
var inStrictMode;
var symbolCount = 0;
var Symbol;
Expand Down Expand Up @@ -10516,6 +10517,7 @@ var ts;
hasAsyncFunctions = false;
hasDecorators = false;
hasParameterDecorators = false;
hasJsxSpreadAttribute = false;
}
return bindSourceFile;
function createSymbol(flags, name) {
Expand Down Expand Up @@ -10729,6 +10731,9 @@ var ts;
if (hasAsyncFunctions) {
flags |= 33554432;
}
if (hasJsxSpreadAttribute) {
flags |= 1073741824;
}
}
node.flags = flags;
if (saveState) {
Expand Down Expand Up @@ -11291,6 +11296,9 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 4, 107455);
case 250:
return bindPropertyOrMethodOrAccessor(node, 8, 107455);
case 242:
hasJsxSpreadAttribute = true;
return;
case 148:
case 149:
case 150:
Expand Down Expand Up @@ -26673,6 +26681,7 @@ var ts;
};
function emitFiles(resolver, host, targetSourceFile) {
var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};";
var assignHelper = "\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};";
var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};";
var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};";
Expand Down Expand Up @@ -26752,6 +26761,7 @@ var ts;
var decoratedClassAliases;
var convertedLoopState;
var extendsEmitted;
var assignEmitted;
var decorateEmitted;
var paramEmitted;
var awaiterEmitted;
Expand Down Expand Up @@ -26816,6 +26826,7 @@ var ts;
decorateEmitted = false;
paramEmitted = false;
awaiterEmitted = false;
assignEmitted = false;
tempFlags = 0;
tempVariables = undefined;
tempParameters = undefined;
Expand Down Expand Up @@ -27278,8 +27289,7 @@ var ts;
else {
var attrs = openingNode.attributes;
if (ts.forEach(attrs, function (attr) { return attr.kind === 242; })) {
emitExpressionIdentifier(syntheticReactRef);
write(".__spread(");
write("__assign(");
var haveOpenedObjectLiteral = false;
for (var i = 0; i < attrs.length; i++) {
if (attrs[i].kind === 242) {
Expand Down Expand Up @@ -32092,10 +32102,14 @@ var ts;
}
function emitEmitHelpers(node) {
if (!compilerOptions.noEmitHelpers) {
if ((languageVersion < 2) && (!extendsEmitted && node.flags & 4194304)) {
if (languageVersion < 2 && !extendsEmitted && node.flags & 4194304) {
writeLines(extendsHelper);
extendsEmitted = true;
}
if (compilerOptions.jsx !== 1 && !assignEmitted && (node.flags & 1073741824)) {
writeLines(assignHelper);
assignEmitted = true;
}
if (!decorateEmitted && node.flags & 8388608) {
writeLines(decorateHelper);
if (compilerOptions.emitDecoratorMetadata) {
Expand Down Expand Up @@ -32528,7 +32542,7 @@ var ts;
ts.ioWriteTime = 0;
ts.maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
var emptyArray = [];
ts.version = "1.8.9";
ts.version = "1.8.10";
function findConfigFile(searchPath, fileExists) {
var fileName = "tsconfig.json";
while (true) {
Expand Down
22 changes: 18 additions & 4 deletions lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -11111,6 +11111,7 @@ var ts;
var hasAsyncFunctions;
var hasDecorators;
var hasParameterDecorators;
var hasJsxSpreadAttribute;
var inStrictMode;
var symbolCount = 0;
var Symbol;
Expand Down Expand Up @@ -11141,6 +11142,7 @@ var ts;
hasAsyncFunctions = false;
hasDecorators = false;
hasParameterDecorators = false;
hasJsxSpreadAttribute = false;
}
return bindSourceFile;
function createSymbol(flags, name) {
Expand Down Expand Up @@ -11354,6 +11356,9 @@ var ts;
if (hasAsyncFunctions) {
flags |= 33554432;
}
if (hasJsxSpreadAttribute) {
flags |= 1073741824;
}
}
node.flags = flags;
if (saveState) {
Expand Down Expand Up @@ -11916,6 +11921,9 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 4, 107455);
case 250:
return bindPropertyOrMethodOrAccessor(node, 8, 107455);
case 242:
hasJsxSpreadAttribute = true;
return;
case 148:
case 149:
case 150:
Expand Down Expand Up @@ -27298,6 +27306,7 @@ var ts;
};
function emitFiles(resolver, host, targetSourceFile) {
var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};";
var assignHelper = "\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};";
var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};";
var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};";
Expand Down Expand Up @@ -27377,6 +27386,7 @@ var ts;
var decoratedClassAliases;
var convertedLoopState;
var extendsEmitted;
var assignEmitted;
var decorateEmitted;
var paramEmitted;
var awaiterEmitted;
Expand Down Expand Up @@ -27441,6 +27451,7 @@ var ts;
decorateEmitted = false;
paramEmitted = false;
awaiterEmitted = false;
assignEmitted = false;
tempFlags = 0;
tempVariables = undefined;
tempParameters = undefined;
Expand Down Expand Up @@ -27903,8 +27914,7 @@ var ts;
else {
var attrs = openingNode.attributes;
if (ts.forEach(attrs, function (attr) { return attr.kind === 242; })) {
emitExpressionIdentifier(syntheticReactRef);
write(".__spread(");
write("__assign(");
var haveOpenedObjectLiteral = false;
for (var i = 0; i < attrs.length; i++) {
if (attrs[i].kind === 242) {
Expand Down Expand Up @@ -32717,10 +32727,14 @@ var ts;
}
function emitEmitHelpers(node) {
if (!compilerOptions.noEmitHelpers) {
if ((languageVersion < 2) && (!extendsEmitted && node.flags & 4194304)) {
if (languageVersion < 2 && !extendsEmitted && node.flags & 4194304) {
writeLines(extendsHelper);
extendsEmitted = true;
}
if (compilerOptions.jsx !== 1 && !assignEmitted && (node.flags & 1073741824)) {
writeLines(assignHelper);
assignEmitted = true;
}
if (!decorateEmitted && node.flags & 8388608) {
writeLines(decorateHelper);
if (compilerOptions.emitDecoratorMetadata) {
Expand Down Expand Up @@ -33153,7 +33167,7 @@ var ts;
ts.ioWriteTime = 0;
ts.maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
var emptyArray = [];
ts.version = "1.8.9";
ts.version = "1.8.10";
function findConfigFile(searchPath, fileExists) {
var fileName = "tsconfig.json";
while (true) {
Expand Down
1 change: 1 addition & 0 deletions lib/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ declare namespace ts {
HasDecorators = 8388608,
HasParamDecorators = 16777216,
HasAsyncFunctions = 33554432,
HasJsxSpreadAttribute = 1073741824,
Modifier = 1022,
AccessibilityModifier = 56,
BlockScoped = 24576,
Expand Down
27 changes: 22 additions & 5 deletions lib/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ var ts;
NodeFlags[NodeFlags["HasDecorators"] = 8388608] = "HasDecorators";
NodeFlags[NodeFlags["HasParamDecorators"] = 16777216] = "HasParamDecorators";
NodeFlags[NodeFlags["HasAsyncFunctions"] = 33554432] = "HasAsyncFunctions";
// This was picked out from the 'master' branch.
// To keep the flags consistent, we're skipping a few ahead.
NodeFlags[NodeFlags["HasJsxSpreadAttribute"] = 1073741824] = "HasJsxSpreadAttribute";
NodeFlags[NodeFlags["Modifier"] = 1022] = "Modifier";
NodeFlags[NodeFlags["AccessibilityModifier"] = 56] = "AccessibilityModifier";
NodeFlags[NodeFlags["BlockScoped"] = 24576] = "BlockScoped";
Expand Down Expand Up @@ -13267,6 +13270,7 @@ var ts;
var hasAsyncFunctions;
var hasDecorators;
var hasParameterDecorators;
var hasJsxSpreadAttribute;
// If this file is an external module, then it is automatically in strict-mode according to
// ES6. If it is not an external module, then we'll determine if it is in strict mode or
// not depending on if we see "use strict" in certain places (or if we hit a class/namespace).
Expand Down Expand Up @@ -13300,6 +13304,7 @@ var ts;
hasAsyncFunctions = false;
hasDecorators = false;
hasParameterDecorators = false;
hasJsxSpreadAttribute = false;
}
return bindSourceFile;
function createSymbol(flags, name) {
Expand Down Expand Up @@ -13592,6 +13597,9 @@ var ts;
if (hasAsyncFunctions) {
flags |= 33554432 /* HasAsyncFunctions */;
}
if (hasJsxSpreadAttribute) {
flags |= 1073741824 /* HasJsxSpreadAttribute */;
}
}
node.flags = flags;
if (saveState) {
Expand Down Expand Up @@ -14281,6 +14289,9 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */);
case 250 /* EnumMember */:
return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */);
case 242 /* JsxSpreadAttribute */:
hasJsxSpreadAttribute = true;
return;
case 148 /* CallSignature */:
case 149 /* ConstructSignature */:
case 150 /* IndexSignature */:
Expand Down Expand Up @@ -32450,6 +32461,7 @@ var ts;
function emitFiles(resolver, host, targetSourceFile) {
// emit output for the __extends helper function
var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};";
var assignHelper = "\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};";
// emit output for the __decorate helper function
var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};";
// emit output for the __metadata helper function
Expand Down Expand Up @@ -32539,6 +32551,7 @@ var ts;
var decoratedClassAliases;
var convertedLoopState;
var extendsEmitted;
var assignEmitted;
var decorateEmitted;
var paramEmitted;
var awaiterEmitted;
Expand Down Expand Up @@ -32609,6 +32622,7 @@ var ts;
decorateEmitted = false;
paramEmitted = false;
awaiterEmitted = false;
assignEmitted = false;
tempFlags = 0;
tempVariables = undefined;
tempParameters = undefined;
Expand Down Expand Up @@ -33165,11 +33179,10 @@ var ts;
}
else {
// Either emit one big object literal (no spread attribs), or
// a call to React.__spread
// a call to the __assign helper
var attrs = openingNode.attributes;
if (ts.forEach(attrs, function (attr) { return attr.kind === 242 /* JsxSpreadAttribute */; })) {
emitExpressionIdentifier(syntheticReactRef);
write(".__spread(");
write("__assign(");
var haveOpenedObjectLiteral = false;
for (var i = 0; i < attrs.length; i++) {
if (attrs[i].kind === 242 /* JsxSpreadAttribute */) {
Expand Down Expand Up @@ -38850,10 +38863,14 @@ var ts;
if (!compilerOptions.noEmitHelpers) {
// Only Emit __extends function when target ES5.
// For target ES6 and above, we can emit classDeclaration as is.
if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && node.flags & 4194304 /* HasClassExtends */)) {
if (languageVersion < 2 /* ES6 */ && !extendsEmitted && node.flags & 4194304 /* HasClassExtends */) {
writeLines(extendsHelper);
extendsEmitted = true;
}
if (compilerOptions.jsx !== 1 /* Preserve */ && !assignEmitted && (node.flags & 1073741824 /* HasJsxSpreadAttribute */)) {
writeLines(assignHelper);
assignEmitted = true;
}
if (!decorateEmitted && node.flags & 8388608 /* HasDecorators */) {
writeLines(decorateHelper);
if (compilerOptions.emitDecoratorMetadata) {
Expand Down Expand Up @@ -39343,7 +39360,7 @@ var ts;
/* @internal */ ts.maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
/** The version of the TypeScript compiler release */
var emptyArray = [];
ts.version = "1.8.9";
ts.version = "1.8.10";
function findConfigFile(searchPath, fileExists) {
var fileName = "tsconfig.json";
while (true) {
Expand Down
1 change: 1 addition & 0 deletions lib/typescriptServices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ declare namespace ts {
HasDecorators = 8388608,
HasParamDecorators = 16777216,
HasAsyncFunctions = 33554432,
HasJsxSpreadAttribute = 1073741824,
Modifier = 1022,
AccessibilityModifier = 56,
BlockScoped = 24576,
Expand Down
Loading