Skip to content

Commit 35ef1f7

Browse files
committed
Merge branch 'master' into asyncGenerators
2 parents 2e62d5e + c320c88 commit 35ef1f7

File tree

1,076 files changed

+45773
-40265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,076 files changed

+45773
-40265
lines changed

Gulpfile.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,23 +251,21 @@ function needsUpdate(source: string | string[], dest: string | string[]): boolea
251251
return true;
252252
}
253253

254+
// Doing tsconfig inheritance manually. https://github.com/ivogabe/gulp-typescript/issues/459
255+
const tsconfigBase = JSON.parse(fs.readFileSync("src/tsconfig-base.json", "utf-8")).compilerOptions;
256+
254257
function getCompilerSettings(base: tsc.Settings, useBuiltCompiler?: boolean): tsc.Settings {
255258
const copy: tsc.Settings = {};
256-
copy.noEmitOnError = true;
257-
copy.noImplicitAny = true;
258-
copy.noImplicitThis = true;
259-
copy.pretty = true;
260-
copy.types = [];
259+
for (const key in tsconfigBase) {
260+
copy[key] = tsconfigBase[key];
261+
}
261262
for (const key in base) {
262263
copy[key] = base[key];
263264
}
264265
if (!useDebugMode) {
265266
if (copy.removeComments === undefined) copy.removeComments = true;
266267
copy.newLine = "lf";
267268
}
268-
else {
269-
copy.preserveConstEnums = true;
270-
}
271269
if (useBuiltCompiler === true) {
272270
copy.typescript = require("./built/local/typescript.js");
273271
}
@@ -480,7 +478,10 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
480478
js.pipe(prependCopyright())
481479
.pipe(sourcemaps.write("."))
482480
.pipe(gulp.dest(".")),
483-
dts.pipe(prependCopyright())
481+
dts.pipe(prependCopyright(/*outputCopyright*/true))
482+
.pipe(insert.transform((content) => {
483+
return content + "\r\nexport = ts;\r\nexport as namespace ts;";
484+
}))
484485
.pipe(gulp.dest("."))
485486
]);
486487
});

Jakefile.js

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ var servicesSources = [
151151
"signatureHelp.ts",
152152
"symbolDisplay.ts",
153153
"transpile.ts",
154+
// Formatting
154155
"formatting/formatting.ts",
155156
"formatting/formattingContext.ts",
156157
"formatting/formattingRequestKind.ts",
@@ -166,36 +167,53 @@ var servicesSources = [
166167
"formatting/rulesMap.ts",
167168
"formatting/rulesProvider.ts",
168169
"formatting/smartIndenter.ts",
169-
"formatting/tokenRange.ts"
170+
"formatting/tokenRange.ts",
171+
// CodeFixes
172+
"codeFixProvider.ts",
173+
"codefixes/fixes.ts",
174+
"codefixes/fixExtendsInterfaceBecomesImplements.ts",
175+
"codefixes/fixClassIncorrectlyImplementsInterface.ts",
176+
"codefixes/fixClassDoesntImplementInheritedAbstractMember.ts",
177+
"codefixes/fixClassSuperMustPrecedeThisAccess.ts",
178+
"codefixes/fixConstructorForDerivedNeedSuperCall.ts",
179+
"codefixes/helpers.ts",
180+
"codefixes/importFixes.ts",
181+
"codefixes/unusedIdentifierFixes.ts"
170182
].map(function (f) {
171183
return path.join(servicesDirectory, f);
172184
}));
173185

174-
var serverCoreSources = [
175-
"types.d.ts",
176-
"shared.ts",
177-
"utilities.ts",
178-
"scriptVersionCache.ts",
179-
"typingsCache.ts",
180-
"scriptInfo.ts",
186+
var baseServerCoreSources = [
187+
"builder.ts",
188+
"editorServices.ts",
181189
"lsHost.ts",
182190
"project.ts",
183-
"editorServices.ts",
184191
"protocol.ts",
192+
"scriptInfo.ts",
193+
"scriptVersionCache.ts",
185194
"session.ts",
186-
"server.ts"
195+
"shared.ts",
196+
"types.ts",
197+
"typingsCache.ts",
198+
"utilities.ts",
187199
].map(function (f) {
188200
return path.join(serverDirectory, f);
189201
});
190202

203+
var serverCoreSources = [
204+
"server.ts"
205+
].map(function (f) {
206+
return path.join(serverDirectory, f);
207+
}).concat(baseServerCoreSources);
208+
191209
var cancellationTokenSources = [
192210
"cancellationToken.ts"
193211
].map(function (f) {
194212
return path.join(cancellationTokenDirectory, f);
195213
});
196214

197215
var typingsInstallerSources = [
198-
"../types.d.ts",
216+
"../types.ts",
199217
"../shared.ts",
200218
"typingsInstaller.ts",
201219
"nodeTypingsInstaller.ts"
@@ -204,20 +222,7 @@ var typingsInstallerSources = [
204222
});
205223

206224
var serverSources = serverCoreSources.concat(servicesSources);
207-
208-
var languageServiceLibrarySources = [
209-
"protocol.ts",
210-
"utilities.ts",
211-
"scriptVersionCache.ts",
212-
"scriptInfo.ts",
213-
"lsHost.ts",
214-
"project.ts",
215-
"editorServices.ts",
216-
"session.ts",
217-
218-
].map(function (f) {
219-
return path.join(serverDirectory, f);
220-
}).concat(servicesSources);
225+
var languageServiceLibrarySources = baseServerCoreSources.concat(servicesSources);
221226

222227
var harnessCoreSources = [
223228
"harness.ts",
@@ -724,7 +729,18 @@ compileFile(
724729
[builtLocalDirectory, copyright, builtLocalCompiler].concat(languageServiceLibrarySources).concat(libraryTargets),
725730
/*prefixes*/[copyright],
726731
/*useBuiltCompiler*/ true,
727-
{ noOutFile: false, generateDeclarations: true });
732+
{ noOutFile: false, generateDeclarations: true, stripInternal: true },
733+
/*callback*/ function () {
734+
prependFile(copyright, tsserverLibraryDefinitionFile);
735+
736+
// Appending exports at the end of the server library
737+
var tsserverLibraryDefinitionFileContents =
738+
fs.readFileSync(tsserverLibraryDefinitionFile).toString() +
739+
"\r\nexport = ts;" +
740+
"\r\nexport as namespace ts;";
741+
742+
fs.writeFileSync(tsserverLibraryDefinitionFile, tsserverLibraryDefinitionFileContents);
743+
});
728744

729745
// Local target to build the language service server library
730746
desc("Builds language service server library");

lib/lib.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,9 @@ interface Array<T> {
11911191
/**
11921192
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
11931193
* @param start The zero-based location in the array from which to start removing elements.
1194+
* @param deleteCount The number of elements to remove.
11941195
*/
1195-
splice(start: number): T[];
1196+
splice(start: number, deleteCount?: number): T[];
11961197
/**
11971198
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
11981199
* @param start The zero-based location in the array from which to start removing elements.

lib/lib.es5.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,9 @@ interface Array<T> {
11911191
/**
11921192
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
11931193
* @param start The zero-based location in the array from which to start removing elements.
1194+
* @param deleteCount The number of elements to remove.
11941195
*/
1195-
splice(start: number): T[];
1196+
splice(start: number, deleteCount?: number): T[];
11961197
/**
11971198
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
11981199
* @param start The zero-based location in the array from which to start removing elements.

lib/lib.es6.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,9 @@ interface Array<T> {
11911191
/**
11921192
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
11931193
* @param start The zero-based location in the array from which to start removing elements.
1194+
* @param deleteCount The number of elements to remove.
11941195
*/
1195-
splice(start: number): T[];
1196+
splice(start: number, deleteCount?: number): T[];
11961197
/**
11971198
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
11981199
* @param start The zero-based location in the array from which to start removing elements.

lib/protocol.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,12 +1722,14 @@ declare namespace ts.server.protocol {
17221722
insertSpaceAfterCommaDelimiter?: boolean;
17231723
insertSpaceAfterSemicolonInForStatements?: boolean;
17241724
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
1725+
insertSpaceAfterConstructor?: boolean;
17251726
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
17261727
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
17271728
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
17281729
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
17291730
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
17301731
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
1732+
insertSpaceBeforeFunctionParenthesis?: boolean;
17311733
placeOpenBraceOnNewLineForFunctions?: boolean;
17321734
placeOpenBraceOnNewLineForControlBlocks?: boolean;
17331735
}

0 commit comments

Comments
 (0)