mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #39980 from amcasey/pinned-release-3.2
Make release-3.2 buildable
This commit is contained in:
+1
-2
@@ -75,5 +75,4 @@ tests/cases/user/*/**/*.d.ts
|
||||
!tests/cases/user/discord.js/
|
||||
tests/baselines/reference/dt
|
||||
.failed-tests
|
||||
TEST-results.xml
|
||||
package-lock.json
|
||||
TEST-results.xml
|
||||
+3
-3
@@ -1,9 +1,8 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 'node'
|
||||
- '8'
|
||||
- '10'
|
||||
- '6'
|
||||
|
||||
sudo: false
|
||||
|
||||
@@ -21,11 +20,12 @@ branches:
|
||||
- release-2.9
|
||||
- release-3.0
|
||||
- release-3.1
|
||||
- release-3.2
|
||||
|
||||
install:
|
||||
- npm uninstall typescript --no-save
|
||||
- npm uninstall tslint --no-save
|
||||
- npm install
|
||||
- npm ci
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
Generated
+6586
File diff suppressed because it is too large
Load Diff
@@ -143,6 +143,7 @@ namespace ts {
|
||||
|
||||
let symbolCount = 0;
|
||||
|
||||
// tslint:disable-next-line callable-types
|
||||
let Symbol: { new (flags: SymbolFlags, name: __String): Symbol }; // tslint:disable-line variable-name
|
||||
let classifiableNames: UnderscoreEscapedMap<true>;
|
||||
|
||||
@@ -2754,7 +2755,9 @@ namespace ts {
|
||||
|
||||
// If this is a property-parameter, then also declare the property symbol into the
|
||||
// containing class.
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
if (isParameterPropertyDeclaration(node)) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
const classDeclaration = <ClassLikeDeclaration>node.parent.parent;
|
||||
declareSymbol(classDeclaration.symbol.members!, classDeclaration.symbol, node, SymbolFlags.Property | (node.questionToken ? SymbolFlags.Optional : SymbolFlags.None), SymbolFlags.PropertyExcludes);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace ts {
|
||||
if (useOldState) {
|
||||
// Verify the sanity of old state
|
||||
if (!oldState!.currentChangedFilePath) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
Debug.assert(!oldState!.affectedFiles && (!oldState!.currentAffectedFilesSignatures || !oldState!.currentAffectedFilesSignatures!.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
||||
}
|
||||
if (canCopySemanticDiagnostics) {
|
||||
|
||||
@@ -9476,6 +9476,7 @@ namespace ts {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
return links.resolvedType!; // TODO: GH#18217
|
||||
}
|
||||
|
||||
@@ -25414,7 +25415,9 @@ namespace ts {
|
||||
if (node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.BindingElement) {
|
||||
checkVarDeclaredNamesNotShadowed(node);
|
||||
}
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
checkCollisionWithRequireExportsInGeneratedCode(node, <Identifier>node.name);
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
checkCollisionWithGlobalPromiseInGeneratedCode(node, <Identifier>node.name);
|
||||
}
|
||||
}
|
||||
@@ -30047,9 +30050,11 @@ namespace ts {
|
||||
node.kind === SyntaxKind.FunctionExpression ||
|
||||
node.kind === SyntaxKind.MethodDeclaration);
|
||||
if (node.flags & NodeFlags.Ambient) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
return grammarErrorOnNode(node.asteriskToken!, Diagnostics.Generators_are_not_allowed_in_an_ambient_context);
|
||||
}
|
||||
if (!node.body) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
return grammarErrorOnNode(node.asteriskToken!, Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);
|
||||
}
|
||||
}
|
||||
@@ -30090,6 +30095,7 @@ namespace ts {
|
||||
|
||||
// Modifiers are never allowed on properties except for 'async' on a method declaration
|
||||
if (prop.modifiers) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
for (const mod of prop.modifiers!) { // TODO: GH#19955
|
||||
if (mod.kind !== SyntaxKind.AsyncKeyword || prop.kind !== SyntaxKind.MethodDeclaration) {
|
||||
grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));
|
||||
|
||||
@@ -112,12 +112,14 @@ namespace ts {
|
||||
}
|
||||
|
||||
// The global Map object. This may not be available, so we must test for it.
|
||||
// tslint:disable-next-line callable-types
|
||||
declare const Map: { new <T>(): Map<T> } | undefined;
|
||||
// Internet Explorer's Map doesn't support iteration, so don't use it.
|
||||
// tslint:disable-next-line no-in-operator variable-name
|
||||
export const MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
|
||||
|
||||
// Keep the class inside a function so it doesn't get compiled if it's not used.
|
||||
// tslint:disable-next-line callable-types
|
||||
function shimMap(): { new <T>(): Map<T> } {
|
||||
|
||||
class MapIterator<T, U extends (string | T | [string, T])> {
|
||||
|
||||
@@ -246,6 +246,7 @@ namespace ts {
|
||||
// Explicitly do not passthru either `inline` option
|
||||
});
|
||||
if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === SyntaxKind.SourceFile) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
const sourceFile = declarationTransform.transformed[0] as SourceFile;
|
||||
exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
|
||||
}
|
||||
|
||||
@@ -7774,12 +7774,15 @@ namespace ts {
|
||||
context.hasNoDefaultLib = true;
|
||||
}
|
||||
else if (arg!.arguments.types) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
typeReferenceDirectives.push({ pos: arg!.arguments.types!.pos, end: arg!.arguments.types!.end, fileName: arg!.arguments.types!.value });
|
||||
}
|
||||
else if (arg!.arguments.lib) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
libReferenceDirectives.push({ pos: arg!.arguments.lib!.pos, end: arg!.arguments.lib!.end, fileName: arg!.arguments.lib!.value });
|
||||
}
|
||||
else if (arg!.arguments.path) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
referencedFiles.push({ pos: arg!.arguments.path!.pos, end: arg!.arguments.path!.end, fileName: arg!.arguments.path!.value });
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -3488,10 +3488,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (member.kind === SyntaxKind.GetAccessor && !getAccessor) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
getAccessor = <GetAccessorDeclaration>member;
|
||||
}
|
||||
|
||||
if (member.kind === SyntaxKind.SetAccessor && !setAccessor) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
setAccessor = <SetAccessorDeclaration>member;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,9 @@ namespace compiler {
|
||||
}
|
||||
|
||||
public getSourceMapRecord(): string | undefined {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
if (this.result!.sourceMaps && this.result!.sourceMaps!.length > 0) {
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion
|
||||
return Harness.SourceMapRecorder.getSourceMapRecord(this.result!.sourceMaps!, this.program!, Array.from(this.js.values()).filter(d => !ts.fileExtensionIs(d.file, ts.Extension.Json)), Array.from(this.dts.values()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -600,6 +600,7 @@ namespace FourSlash {
|
||||
throw new Error("Expected exactly one output from emit of " + this.activeFile.fileName);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line function-constructor
|
||||
const evaluation = new Function(`${emit.outputFiles[0].text};\r\nreturn (${expr});`)();
|
||||
if (evaluation !== value) {
|
||||
this.raiseError(`Expected evaluation of expression "${expr}" to equal "${value}", but got "${evaluation}"`);
|
||||
|
||||
@@ -28,10 +28,12 @@ var assert: typeof _chai.assert = _chai.assert;
|
||||
};
|
||||
}
|
||||
|
||||
// tslint:disable-next-line function-constructor
|
||||
var global: NodeJS.Global = Function("return this").call(undefined);
|
||||
|
||||
declare var window: {};
|
||||
declare var XMLHttpRequest: {
|
||||
// tslint:disable-next-line callable-types
|
||||
new(): XMLHttpRequest;
|
||||
};
|
||||
interface XMLHttpRequest {
|
||||
|
||||
@@ -450,6 +450,7 @@ namespace ts.refactor.extractSymbol {
|
||||
rangeFacts |= RangeFacts.UsesThis;
|
||||
break;
|
||||
case SyntaxKind.LabeledStatement:
|
||||
// tslint:disable-next-line one-line
|
||||
{
|
||||
const label = (<LabeledStatement>node).label;
|
||||
(seenLabels || (seenLabels = [])).push(label.escapedText);
|
||||
@@ -459,6 +460,7 @@ namespace ts.refactor.extractSymbol {
|
||||
}
|
||||
case SyntaxKind.BreakStatement:
|
||||
case SyntaxKind.ContinueStatement:
|
||||
// tslint:disable-next-line one-line
|
||||
{
|
||||
const label = (<BreakStatement | ContinueStatement>node).label;
|
||||
if (label) {
|
||||
|
||||
@@ -389,6 +389,7 @@ namespace ts.server {
|
||||
this.inspectValuePromise = undefined;
|
||||
break;
|
||||
case EventInitializationFailed:
|
||||
// tslint:disable-next-line one-line
|
||||
{
|
||||
const body: protocol.TypesInstallerInitializationFailedEventBody = {
|
||||
message: response.message
|
||||
@@ -398,6 +399,7 @@ namespace ts.server {
|
||||
break;
|
||||
}
|
||||
case EventBeginInstallTypes:
|
||||
// tslint:disable-next-line one-line
|
||||
{
|
||||
const body: protocol.BeginInstallTypesEventBody = {
|
||||
eventId: response.eventId,
|
||||
@@ -408,6 +410,7 @@ namespace ts.server {
|
||||
break;
|
||||
}
|
||||
case EventEndInstallTypes:
|
||||
// tslint:disable-next-line one-line
|
||||
{
|
||||
if (this.telemetryEnabled) {
|
||||
const body: protocol.TypingsInstalledTelemetryEventBody = {
|
||||
@@ -432,11 +435,13 @@ namespace ts.server {
|
||||
break;
|
||||
}
|
||||
case ActionInvalidate:
|
||||
// tslint:disable-next-line one-line
|
||||
{
|
||||
this.projectService.updateTypingsForProject(response);
|
||||
break;
|
||||
}
|
||||
case ActionSet:
|
||||
// tslint:disable-next-line one-line
|
||||
{
|
||||
if (this.activeRequestCount > 0) {
|
||||
this.activeRequestCount--;
|
||||
|
||||
Reference in New Issue
Block a user