Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e96b17b

Browse filesBrowse files
committed
Merge branch 'master' into add-undefined-to-default-valued-parameters
2 parents 8a9ee1a + b9a18fd commit e96b17b
Copy full SHA for e96b17b

632 files changed

+46,075-40,842Lines changed: 46075 additions & 40842 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Gulpfile.ts‎

Copy file name to clipboardExpand all lines: Gulpfile.ts
+11-9Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,23 +242,21 @@ function needsUpdate(source: string | string[], dest: string | string[]): boolea
242242
return true;
243243
}
244244

245+
// Doing tsconfig inheritance manually. https://github.com/ivogabe/gulp-typescript/issues/459
246+
const tsconfigBase = JSON.parse(fs.readFileSync("src/tsconfig-base.json", "utf-8")).compilerOptions;
247+
245248
function getCompilerSettings(base: tsc.Settings, useBuiltCompiler?: boolean): tsc.Settings {
246249
const copy: tsc.Settings = {};
247-
copy.noEmitOnError = true;
248-
copy.noImplicitAny = true;
249-
copy.noImplicitThis = true;
250-
copy.pretty = true;
251-
copy.types = [];
250+
for (const key in tsconfigBase) {
251+
copy[key] = tsconfigBase[key];
252+
}
252253
for (const key in base) {
253254
copy[key] = base[key];
254255
}
255256
if (!useDebugMode) {
256257
if (copy.removeComments === undefined) copy.removeComments = true;
257258
copy.newLine = "lf";
258259
}
259-
else {
260-
copy.preserveConstEnums = true;
261-
}
262260
if (useBuiltCompiler === true) {
263261
copy.typescript = require("./built/local/typescript.js");
264262
}
@@ -330,6 +328,7 @@ const builtGeneratedDiagnosticMessagesJSON = path.join(builtLocalDirectory, "dia
330328
// processDiagnosticMessages script
331329
gulp.task(processDiagnosticMessagesJs, false, [], () => {
332330
const settings: tsc.Settings = getCompilerSettings({
331+
target: "es5",
333332
declaration: false,
334333
removeComments: true,
335334
noResolve: false,
@@ -471,7 +470,10 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
471470
js.pipe(prependCopyright())
472471
.pipe(sourcemaps.write("."))
473472
.pipe(gulp.dest(".")),
474-
dts.pipe(prependCopyright())
473+
dts.pipe(prependCopyright(/*outputCopyright*/true))
474+
.pipe(insert.transform((content) => {
475+
return content + "\r\nexport = ts;\r\nexport as namespace ts;";
476+
}))
475477
.pipe(gulp.dest("."))
476478
]);
477479
});
Collapse file

‎Jakefile.js‎

Copy file name to clipboardExpand all lines: Jakefile.js
+30-26Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -183,31 +183,37 @@ var servicesSources = [
183183
return path.join(servicesDirectory, f);
184184
}));
185185

186-
var serverCoreSources = [
187-
"types.d.ts",
188-
"shared.ts",
189-
"utilities.ts",
190-
"scriptVersionCache.ts",
191-
"typingsCache.ts",
192-
"scriptInfo.ts",
186+
var baseServerCoreSources = [
187+
"builder.ts",
188+
"editorServices.ts",
193189
"lsHost.ts",
194190
"project.ts",
195-
"editorServices.ts",
196191
"protocol.ts",
192+
"scriptInfo.ts",
193+
"scriptVersionCache.ts",
197194
"session.ts",
198-
"server.ts"
195+
"shared.ts",
196+
"types.ts",
197+
"typingsCache.ts",
198+
"utilities.ts",
199199
].map(function (f) {
200200
return path.join(serverDirectory, f);
201201
});
202202

203+
var serverCoreSources = [
204+
"server.ts"
205+
].map(function (f) {
206+
return path.join(serverDirectory, f);
207+
}).concat(baseServerCoreSources);
208+
203209
var cancellationTokenSources = [
204210
"cancellationToken.ts"
205211
].map(function (f) {
206212
return path.join(cancellationTokenDirectory, f);
207213
});
208214

209215
var typingsInstallerSources = [
210-
"../types.d.ts",
216+
"../types.ts",
211217
"../shared.ts",
212218
"typingsInstaller.ts",
213219
"nodeTypingsInstaller.ts"
@@ -216,20 +222,7 @@ var typingsInstallerSources = [
216222
});
217223

218224
var serverSources = serverCoreSources.concat(servicesSources);
219-
220-
var languageServiceLibrarySources = [
221-
"protocol.ts",
222-
"utilities.ts",
223-
"scriptVersionCache.ts",
224-
"scriptInfo.ts",
225-
"lsHost.ts",
226-
"project.ts",
227-
"editorServices.ts",
228-
"session.ts",
229-
230-
].map(function (f) {
231-
return path.join(serverDirectory, f);
232-
}).concat(servicesSources);
225+
var languageServiceLibrarySources = baseServerCoreSources.concat(servicesSources);
233226

234227
var harnessCoreSources = [
235228
"harness.ts",
@@ -463,7 +456,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
463456
options += " --stripInternal";
464457
}
465458

466-
options += " --target es5 --noUnusedLocals --noUnusedParameters";
459+
options += " --target es5 --lib es5,scripthost --noUnusedLocals --noUnusedParameters";
467460

468461
var cmd = host + " " + compilerPath + " " + options + " ";
469462
cmd = cmd + sources.join(" ");
@@ -727,7 +720,18 @@ compileFile(
727720
[builtLocalDirectory, copyright, builtLocalCompiler].concat(languageServiceLibrarySources).concat(libraryTargets),
728721
/*prefixes*/[copyright],
729722
/*useBuiltCompiler*/ true,
730-
{ 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+
});
731735

732736
// Local target to build the language service server library
733737
desc("Builds language service server library");
Collapse file

‎lib/lib.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.d.ts
+2-1Lines 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.
Collapse file

‎lib/lib.es5.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es5.d.ts
+2-1Lines 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.
Collapse file

‎lib/lib.es6.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es6.d.ts
+2-1Lines 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.
Collapse file

‎lib/protocol.d.ts‎

Copy file name to clipboardExpand all lines: lib/protocol.d.ts
+2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.