Skip to content

Commit 8c5afd7

Browse files
author
Andy Hanson
committed
Merge branch 'master' into map5
2 parents a677712 + e9e7fce commit 8c5afd7

932 files changed

Lines changed: 42382 additions & 38351 deletions

File tree

Some content is hidden

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

Gulpfile.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,10 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
472472
js.pipe(prependCopyright())
473473
.pipe(sourcemaps.write("."))
474474
.pipe(gulp.dest(".")),
475-
dts.pipe(prependCopyright())
475+
dts.pipe(prependCopyright(/*outputCopyright*/true))
476+
.pipe(insert.transform((content) => {
477+
return content + "\r\nexport = ts;\r\nexport as namespace ts;";
478+
}))
476479
.pipe(gulp.dest("."))
477480
]);
478481
});

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",
@@ -715,7 +720,18 @@ compileFile(
715720
[builtLocalDirectory, copyright, builtLocalCompiler].concat(languageServiceLibrarySources).concat(libraryTargets),
716721
/*prefixes*/[copyright],
717722
/*useBuiltCompiler*/ true,
718-
{ noOutFile: false, generateDeclarations: true });
723+
{ noOutFile: false, generateDeclarations: true, stripInternal: true },
724+
/*callback*/ function () {
725+
prependFile(copyright, tsserverLibraryDefinitionFile);
726+
727+
// Appending exports at the end of the server library
728+
var tsserverLibraryDefinitionFileContents =
729+
fs.readFileSync(tsserverLibraryDefinitionFile).toString() +
730+
"\r\nexport = ts;" +
731+
"\r\nexport as namespace ts;";
732+
733+
fs.writeFileSync(tsserverLibraryDefinitionFile, tsserverLibraryDefinitionFileContents);
734+
});
719735

720736
// Local target to build the language service server library
721737
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)