Projzilla phase 1

This commit is contained in:
Ryan Cavanaugh 2018-06-09 16:48:08 -07:00
parent f4fcb1912c
commit 336c37662d
111 changed files with 18277 additions and 3494 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
{
"compilerOptions": {
"lib": ["es6"],
"sourceMap": false,
"declaration": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,

View File

@ -0,0 +1,57 @@
"use strict";
var fs = require("fs");
function pipeExists(name) {
try {
fs.statSync(name);
return true;
}
catch (e) {
return false;
}
}
function createCancellationToken(args) {
var cancellationPipeName;
for (var i = 0; i < args.length - 1; i++) {
if (args[i] === "--cancellationPipeName") {
cancellationPipeName = args[i + 1];
break;
}
}
if (!cancellationPipeName) {
return {
isCancellationRequested: function () { return false; },
setRequest: function (_requestId) { return void 0; },
resetRequest: function (_requestId) { return void 0; }
};
}
if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
var namePrefix_1 = cancellationPipeName.slice(0, -1);
if (namePrefix_1.length === 0 || namePrefix_1.indexOf("*") >= 0) {
throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'.");
}
var perRequestPipeName_1;
var currentRequestId_1;
return {
isCancellationRequested: function () { return perRequestPipeName_1 !== undefined && pipeExists(perRequestPipeName_1); },
setRequest: function (requestId) {
currentRequestId_1 = requestId;
perRequestPipeName_1 = namePrefix_1 + requestId;
},
resetRequest: function (requestId) {
if (currentRequestId_1 !== requestId) {
throw new Error("Mismatched request id, expected " + currentRequestId_1 + ", actual " + requestId);
}
perRequestPipeName_1 = undefined;
}
};
}
else {
return {
isCancellationRequested: function () { return pipeExists(cancellationPipeName); },
setRequest: function (_requestId) { return void 0; },
resetRequest: function (_requestId) { return void 0; }
};
}
}
module.exports = createCancellationToken;
//# sourceMappingURL=cancellationToken.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"cancellationToken.js","sourceRoot":"","sources":["../../cancellationToken/cancellationToken.ts"],"names":[],"mappings":";AAEA,uBAA0B;AAQ1B,oBAAoB,IAAY;IAC5B,IAAI;QACA,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;KACf;IACD,OAAO,CAAC,EAAE;QACN,OAAO,KAAK,CAAC;KAChB;AACL,CAAC;AAED,iCAAiC,IAAc;IAC3C,IAAI,oBAAwC,CAAC;IAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACtC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,wBAAwB,EAAE;YACtC,oBAAoB,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,MAAM;SACT;KACJ;IACD,IAAI,CAAC,oBAAoB,EAAE;QACvB,OAAO;YACH,uBAAuB,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;YACpC,UAAU,EAAE,UAAC,UAAkB,IAAW,OAAA,KAAK,CAAC,EAAN,CAAM;YAChD,YAAY,EAAE,UAAC,UAAkB,IAAW,OAAA,KAAK,CAAC,EAAN,CAAM;SACrD,CAAC;KACL;IAMD,IAAI,oBAAoB,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QACtE,IAAM,YAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,YAAU,CAAC,MAAM,KAAK,CAAC,IAAI,YAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzD,MAAM,IAAI,KAAK,CAAC,wHAAwH,CAAC,CAAC;SAC7I;QACD,IAAI,oBAAsC,CAAC;QAC3C,IAAI,kBAAwB,CAAC;QAC7B,OAAO;YACH,uBAAuB,EAAE,cAAM,OAAA,oBAAkB,KAAK,SAAS,IAAI,UAAU,CAAC,oBAAkB,CAAC,EAAlE,CAAkE;YACjG,UAAU,YAAC,SAAiB;gBACxB,kBAAgB,GAAG,SAAS,CAAC;gBAC7B,oBAAkB,GAAG,YAAU,GAAG,SAAS,CAAC;YAChD,CAAC;YACD,YAAY,YAAC,SAAiB;gBAC1B,IAAI,kBAAgB,KAAK,SAAS,EAAE;oBAChC,MAAM,IAAI,KAAK,CAAC,qCAAmC,kBAAgB,iBAAY,SAAW,CAAC,CAAC;iBAC/F;gBACD,oBAAkB,GAAG,SAAS,CAAC;YACnC,CAAC;SACJ,CAAC;KACL;SACI;QACD,OAAO;YACH,uBAAuB,EAAE,cAAM,OAAA,UAAU,CAAC,oBAAqB,CAAC,EAAjC,CAAiC;YAChE,UAAU,EAAE,UAAC,UAAkB,IAAW,OAAA,KAAK,CAAC,EAAN,CAAM;YAChD,YAAY,EAAE,UAAC,UAAkB,IAAW,OAAA,KAAK,CAAC,EAAN,CAAM;SACrD,CAAC;KACL;AACL,CAAC;AACD,iBAAS,uBAAuB,CAAC"}

2223
src/built/local/harness.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

11641
src/built/local/harness.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,9 @@
{
"extends": "../../tsconfig-base",
"extends": "../tsconfig-base",
"compilerOptions": {
"outDir": "../built/local/",
"composite": false,
"declaration": false,
"removeComments": true,
"module": "commonjs",
"types": [

View File

@ -6,7 +6,7 @@ namespace ts {
finishRecordingFilesWithChangedResolutions(): Path[] | undefined;
resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined): ResolvedModuleFull[];
getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined;
getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): CachedResolvedModuleWithFailedLookupLocations | undefined;
resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
invalidateResolutionOfFile(filePath: Path): void;
@ -33,7 +33,7 @@ namespace ts {
resolvedFileName: string | undefined;
}
interface ResolvedModuleWithFailedLookupLocations extends ts.ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
interface CachedResolvedModuleWithFailedLookupLocations extends ts.ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
}
interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
@ -85,8 +85,8 @@ namespace ts {
// The resolvedModuleNames and resolvedTypeReferenceDirectives are the cache of resolutions per file.
// The key in the map is source file's path.
// The values are Map of resolutions with key being name lookedup.
const resolvedModuleNames = createMap<Map<ResolvedModuleWithFailedLookupLocations>>();
const perDirectoryResolvedModuleNames = createMap<Map<ResolvedModuleWithFailedLookupLocations>>();
const resolvedModuleNames = createMap<Map<CachedResolvedModuleWithFailedLookupLocations>>();
const perDirectoryResolvedModuleNames = createMap<Map<CachedResolvedModuleWithFailedLookupLocations>>();
const nonRelaticeModuleNameCache = createMap<PerModuleNameCache>();
const moduleResolutionCache = createModuleResolutionCacheWithMaps(
perDirectoryResolvedModuleNames,
@ -133,7 +133,7 @@ namespace ts {
clear
};
function getResolvedModule(resolution: ResolvedModuleWithFailedLookupLocations) {
function getResolvedModule(resolution: CachedResolvedModuleWithFailedLookupLocations) {
return resolution.resolvedModule;
}
@ -211,7 +211,7 @@ namespace ts {
clearPerDirectoryResolutions();
}
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations {
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): CachedResolvedModuleWithFailedLookupLocations {
const primaryResult = ts.resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache);
// return result immediately only if global cache support is not enabled or if it is .ts, .tsx or .d.ts
if (!resolutionHost.getGlobalCache) {
@ -328,7 +328,7 @@ namespace ts {
}
function resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined): ResolvedModuleFull[] {
return resolveNamesWithLocalCache<ResolvedModuleWithFailedLookupLocations, ResolvedModuleFull>(
return resolveNamesWithLocalCache<CachedResolvedModuleWithFailedLookupLocations, ResolvedModuleFull>(
moduleNames, containingFile,
resolvedModuleNames, perDirectoryResolvedModuleNames,
resolveModuleName, getResolvedModule,
@ -336,7 +336,7 @@ namespace ts {
);
}
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined {
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): CachedResolvedModuleWithFailedLookupLocations | undefined {
const cache = resolvedModuleNames.get(resolutionHost.toPath(containingFile));
return cache && cache.get(moduleName);
}

View File

@ -1,19 +1,9 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"removeComments": true,
"outFile": "../../built/local/tsc.js",
"declaration": true
"outFile": "../../built/local/compiler.js"
},
"files": [
"types.ts",
"performance.ts",
"core.ts",
"sys.ts",
"diagnosticInformationMap.generated.ts",
"scanner.ts",
"utilities.ts",
"parser.ts",
"binder.ts",
"symbolWalker.ts",
"moduleNameResolver.ts",
@ -46,8 +36,10 @@
"resolutionCache.ts",
"moduleSpecifiers.ts",
"watch.ts",
"commandLineParser.ts",
"tsbuild.ts",
"tsc.ts",
"tsbuild.ts"
],
"references": [
{ "path": "../core" },
{ "path": "../parser" }
]
}

File diff suppressed because it is too large Load Diff

11
src/core/tsconfig.json Normal file
View File

@ -0,0 +1,11 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/core.js"
},
"files": [
"performance.ts",
"core.ts"
],
"references": [ ]
}

View File

@ -1,30 +1,16 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/// <reference path="..\services\services.ts" />
/// <reference path="..\services\shims.ts" />
/// <reference path="harnessLanguageService.ts" />
/// <reference path="harness.ts" />
/// <reference path="fourslashRunner.ts" />
/// <reference path="./compiler.ts" />
namespace FourSlash {
ts.disableIncrementalParsing = false;
import ArrayOrSingle = FourSlashInterface.ArrayOrSingle;
export const enum FourSlashTestType {
Native,
Shims,
ShimsWithPreprocess,
Server
}
// Represents a parsed source file with metadata
interface FourSlashFile {
// The contents of the file (with markers, etc stripped out)
@ -1317,7 +1303,7 @@ Actual: ${stringify(fullActual)}`);
}
private testDiagnostics(expected: ReadonlyArray<FourSlashInterface.Diagnostic>, diagnostics: ReadonlyArray<ts.Diagnostic>, category: string) {
assert.deepEqual(ts.realizeDiagnostics(diagnostics, ts.newLineCharacter), expected.map((e): ts.RealizedDiagnostic => ({
assert.deepEqual(ts.realizeDiagnostics(diagnostics, "\n"), expected.map((e): ts.RealizedDiagnostic => ({
message: e.message,
category,
code: e.code,

View File

@ -1,31 +1,3 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/// <reference path="..\services\services.ts" />
/// <reference path="..\services\shims.ts" />
/// <reference path="..\server\session.ts" />
/// <reference path="..\server\client.ts" />
/// <reference path="sourceMapRecorder.ts"/>
/// <reference path="runnerbase.ts"/>
/// <reference path="./vfs.ts" />
/// <reference types="node" />
/// <reference types="mocha" />
/// <reference types="chai" />
// Block scoped definitions work poorly for global variables, temporarily enable var
/* tslint:disable:no-var-keyword */

View File

@ -1,8 +1,3 @@
/// <reference path="..\services\services.ts" />
/// <reference path="..\services\shims.ts" />
/// <reference path="..\server\client.ts" />
/// <reference path="harness.ts" />
namespace Harness.LanguageService {
export class ScriptInfo {
public version = 1;

View File

@ -1,9 +1,3 @@
/// <reference path="..\..\src\compiler\sys.ts" />
/// <reference path="..\..\src\harness\harness.ts" />
/// <reference path="..\..\src\harness\harnessLanguageService.ts" />
/// <reference path="..\..\src\harness\runnerbase.ts" />
/// <reference path="..\..\src\harness\typeWriter.ts" />
interface FileInformation {
contents?: string;
contentsPath?: string;

View File

@ -1,20 +1,3 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path="harness.ts"/>
namespace Harness.SourceMapRecorder {
interface SourceMapSpanWithDecodeErrors {

View File

@ -1,9 +1,7 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"removeComments": false,
"outFile": "../../built/local/run.js",
"declaration": false,
"outFile": "../built/local/harness.js",
"types": [
"node", "mocha", "chai"
],
@ -12,138 +10,16 @@
"scripthost"
]
},
"references": [
{ "path": "../core" },
{ "path": "../parser" },
{ "path": "../compiler" },
{ "path": "../services" },
{ "path": "../server" },
{ "path": "../typingsInstallerCore" },
],
"files": [
"../compiler/types.ts",
"../compiler/performance.ts",
"../compiler/core.ts",
"../compiler/sys.ts",
"../compiler/diagnosticInformationMap.generated.ts",
"../compiler/scanner.ts",
"../compiler/utilities.ts",
"../compiler/parser.ts",
"../compiler/binder.ts",
"../compiler/symbolWalker.ts",
"../compiler/moduleNameResolver.ts",
"../compiler/checker.ts",
"../compiler/factory.ts",
"../compiler/visitor.ts",
"../compiler/transformers/utilities.ts",
"../compiler/transformers/destructuring.ts",
"../compiler/transformers/ts.ts",
"../compiler/transformers/es2017.ts",
"../compiler/transformers/esnext.ts",
"../compiler/transformers/jsx.ts",
"../compiler/transformers/es2016.ts",
"../compiler/transformers/es2015.ts",
"../compiler/transformers/es5.ts",
"../compiler/transformers/generators.ts",
"../compiler/transformers/module/module.ts",
"../compiler/transformers/module/system.ts",
"../compiler/transformers/module/es2015.ts",
"../compiler/transformers/declarations/diagnostics.ts",
"../compiler/transformers/declarations.ts",
"../compiler/transformer.ts",
"../compiler/sourcemap.ts",
"../compiler/comments.ts",
"../compiler/emitter.ts",
"../compiler/watchUtilities.ts",
"../compiler/program.ts",
"../compiler/builderState.ts",
"../compiler/builder.ts",
"../compiler/resolutionCache.ts",
"../compiler/moduleSpecifiers.ts",
"../compiler/watch.ts",
"../compiler/tsbuild.ts",
"../compiler/commandLineParser.ts",
"../services/types.ts",
"../services/utilities.ts",
"../services/classifier.ts",
"../services/pathCompletions.ts",
"../services/completions.ts",
"../services/documentHighlights.ts",
"../services/documentRegistry.ts",
"../services/importTracker.ts",
"../services/findAllReferences.ts",
"../services/getEditsForFileRename.ts",
"../services/goToDefinition.ts",
"../services/jsDoc.ts",
"../services/semver.ts",
"../services/jsTyping.ts",
"../services/navigateTo.ts",
"../services/navigationBar.ts",
"../services/organizeImports.ts",
"../services/getEditsForFileRename.ts",
"../services/outliningElementsCollector.ts",
"../services/patternMatcher.ts",
"../services/preProcess.ts",
"../services/rename.ts",
"../services/signatureHelp.ts",
"../services/suggestionDiagnostics.ts",
"../services/symbolDisplay.ts",
"../services/transpile.ts",
"../services/formatting/formattingContext.ts",
"../services/formatting/formattingScanner.ts",
"../services/formatting/rule.ts",
"../services/formatting/rules.ts",
"../services/formatting/rulesMap.ts",
"../services/formatting/formatting.ts",
"../services/formatting/smartIndenter.ts",
"../services/textChanges.ts",
"../services/codeFixProvider.ts",
"../services/refactorProvider.ts",
"../services/codefixes/addMissingInvocationForDecorator.ts",
"../services/codefixes/annotateWithTypeFromJSDoc.ts",
"../services/codefixes/convertFunctionToEs6Class.ts",
"../services/codefixes/convertToEs6Module.ts",
"../services/codefixes/correctQualifiedNameToIndexedAccessType.ts",
"../services/codefixes/fixClassIncorrectlyImplementsInterface.ts",
"../services/codefixes/importFixes.ts",
"../services/codefixes/fixSpelling.ts",
"../services/codefixes/fixAddMissingMember.ts",
"../services/codefixes/fixCannotFindModule.ts",
"../services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts",
"../services/codefixes/fixClassSuperMustPrecedeThisAccess.ts",
"../services/codefixes/fixConstructorForDerivedNeedSuperCall.ts",
"../services/codefixes/fixExtendsInterfaceBecomesImplements.ts",
"../services/codefixes/fixForgottenThisPropertyAccess.ts",
"../services/codefixes/fixUnusedIdentifier.ts",
"../services/codefixes/fixUnreachableCode.ts",
"../services/codefixes/fixUnusedLabel.ts",
"../services/codefixes/fixJSDocTypes.ts",
"../services/codefixes/fixAwaitInSyncFunction.ts",
"../services/codefixes/disableJsDiagnostics.ts",
"../services/codefixes/helpers.ts",
"../services/codefixes/inferFromUsage.ts",
"../services/codefixes/fixInvalidImportSyntax.ts",
"../services/codefixes/fixStrictClassInitialization.ts",
"../services/codefixes/requireInTs.ts",
"../services/codefixes/useDefaultImport.ts",
"../services/codefixes/fixAddModuleReferTypeMissingTypeof.ts",
"../services/codefixes/convertToMappedObjectType.ts",
"../services/refactors/convertImport.ts",
"../services/refactors/extractSymbol.ts",
"../services/refactors/generateGetAccessorAndSetAccessor.ts",
"../services/refactors/moveToNewFile.ts",
"../services/sourcemaps.ts",
"../services/services.ts",
"../services/breakpoints.ts",
"../services/transform.ts",
"../services/shims.ts",
"../server/typingsInstaller/typingsInstaller.ts",
"../server/types.ts",
"../server/shared.ts",
"../server/utilities.ts",
"../server/protocol.ts",
"../server/scriptInfo.ts",
"../server/typingsCache.ts",
"../server/project.ts",
"../server/editorServices.ts",
"../server/session.ts",
"../server/scriptVersionCache.ts",
"collections.ts",
"utils.ts",
"documents.ts",
@ -152,25 +28,15 @@
"compiler.ts",
"evaluator.ts",
"fakes.ts",
"client.ts",
"sourceMapRecorder.ts",
"runnerbase.ts",
"sourceMapRecorder.ts",
"harness.ts",
"harnessLanguageService.ts",
"virtualFileSystemWithWatch.ts",
"fourslashRunner.ts",
"fourslash.ts",
"typeWriter.ts",
"compilerRunner.ts",
"projectsRunner.ts",
"loggedIO.ts",
"rwcRunner.ts",
"externalCompileRunner.ts",
"test262Runner.ts",
"parallel/host.ts",
"parallel/worker.ts",
"parallel/shared.ts",
"runner.ts"
],
"include": ["unittests/**/*.ts"]
"loggedIO.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="harness.ts" />
namespace ts.TestFSWithWatch {
export const libFile: File = {
path: "/a/lib/lib.d.ts",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

18
src/parser/tsconfig.json Normal file
View File

@ -0,0 +1,18 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/parser.js"
},
"files": [
"types.ts",
"sys.ts",
"diagnosticInformationMap.generated.ts",
"scanner.ts",
"utilities.ts",
"parser.ts",
"commandLineParser.ts"
],
"references": [
{ "path": "../core" }
]
}

View File

@ -1,54 +1,4 @@
namespace ts {
/**
* Type of objects whose values are all of the same type.
* The `in` and `for-in` operators can *not* be safely used,
* since `Object.prototype` may be modified by outside code.
*/
export interface MapLike<T> {
[index: string]: T;
}
/** ES6 Map interface, only read methods included. */
export interface ReadonlyMap<T> {
get(key: string): T | undefined;
has(key: string): boolean;
forEach(action: (value: T, key: string) => void): void;
readonly size: number;
keys(): Iterator<string>;
values(): Iterator<T>;
entries(): Iterator<[string, T]>;
}
/** ES6 Map interface. */
export interface Map<T> extends ReadonlyMap<T> {
set(key: string, value: T): this;
delete(key: string): boolean;
clear(): void;
}
/** ES6 Iterator type. */
export interface Iterator<T> {
next(): { value: T, done: false } | { value: never, done: true };
}
/** Array that is only intended to be pushed to, never read. */
export interface Push<T> {
push(...values: T[]): void;
}
/* @internal */
export type EqualityComparer<T> = (a: T, b: T) => boolean;
/* @internal */
export type Comparer<T> = (a: T, b: T) => Comparison;
/* @internal */
export const enum Comparison {
LessThan = -1,
EqualTo = 0,
GreaterThan = 1
}
// branded string type used to store absolute, normalized and canonicalized paths
// arbitrary file name can be converted to Path via toPath function
export type Path = string & { __pathBrand: any };
@ -3619,13 +3569,6 @@ namespace ts {
/** SymbolTable based on ES6 Map interface. */
export type SymbolTable = UnderscoreEscapedMap<Symbol>;
/** Represents a "prefix*suffix" pattern. */
/* @internal */
export interface Pattern {
prefix: string;
suffix: string;
}
/** Used to track a `declare module "foo*"`-like declaration. */
/* @internal */
export interface PatternAmbientModule {
@ -5340,10 +5283,6 @@ namespace ts {
newLength: number;
}
export interface SortedArray<T> extends Array<T> {
" __sortedArrayBrand": any;
}
/* @internal */
export interface DiagnosticCollection {
// Adds a diagnostic to this diagnostic collection.

File diff suppressed because it is too large Load Diff

View File

@ -2,130 +2,19 @@
"extends": "../tsconfig-base",
"compilerOptions": {
"removeComments": true,
"outFile": "../../built/local/tsserver.js",
"outFile": "../../built/local/tsserverlibrary.js",
"preserveConstEnums": true,
"types": [
"node"
]
},
"references": [
{ "path": "../core" },
{ "path": "../parser" },
{ "path": "../compiler" },
{ "path": "../services" }
],
"files": [
"../compiler/types.ts",
"../compiler/performance.ts",
"../compiler/core.ts",
"../compiler/sys.ts",
"../compiler/diagnosticInformationMap.generated.ts",
"../compiler/scanner.ts",
"../compiler/utilities.ts",
"../compiler/parser.ts",
"../compiler/binder.ts",
"../compiler/symbolWalker.ts",
"../compiler/moduleNameResolver.ts",
"../compiler/checker.ts",
"../compiler/factory.ts",
"../compiler/visitor.ts",
"../compiler/transformers/utilities.ts",
"../compiler/transformers/destructuring.ts",
"../compiler/transformers/ts.ts",
"../compiler/transformers/es2017.ts",
"../compiler/transformers/esnext.ts",
"../compiler/transformers/jsx.ts",
"../compiler/transformers/es2016.ts",
"../compiler/transformers/es2015.ts",
"../compiler/transformers/es5.ts",
"../compiler/transformers/generators.ts",
"../compiler/transformers/module/module.ts",
"../compiler/transformers/module/system.ts",
"../compiler/transformers/module/es2015.ts",
"../compiler/transformers/declarations/diagnostics.ts",
"../compiler/transformers/declarations.ts",
"../compiler/transformer.ts",
"../compiler/sourcemap.ts",
"../compiler/comments.ts",
"../compiler/emitter.ts",
"../compiler/watchUtilities.ts",
"../compiler/program.ts",
"../compiler/builderState.ts",
"../compiler/builder.ts",
"../compiler/resolutionCache.ts",
"../compiler/moduleSpecifiers.ts",
"../compiler/watch.ts",
"../compiler/commandLineParser.ts",
"../services/types.ts",
"../services/utilities.ts",
"../services/classifier.ts",
"../services/pathCompletions.ts",
"../services/completions.ts",
"../services/documentHighlights.ts",
"../services/documentRegistry.ts",
"../services/importTracker.ts",
"../services/findAllReferences.ts",
"../services/getEditsForFileRename.ts",
"../services/goToDefinition.ts",
"../services/jsDoc.ts",
"../services/semver.ts",
"../services/jsTyping.ts",
"../services/navigateTo.ts",
"../services/navigationBar.ts",
"../services/organizeImports.ts",
"../services/getEditsForFileRename.ts",
"../services/outliningElementsCollector.ts",
"../services/patternMatcher.ts",
"../services/preProcess.ts",
"../services/rename.ts",
"../services/signatureHelp.ts",
"../services/suggestionDiagnostics.ts",
"../services/symbolDisplay.ts",
"../services/transpile.ts",
"../services/formatting/formattingContext.ts",
"../services/formatting/formattingScanner.ts",
"../services/formatting/rule.ts",
"../services/formatting/rules.ts",
"../services/formatting/rulesMap.ts",
"../services/formatting/formatting.ts",
"../services/formatting/smartIndenter.ts",
"../services/textChanges.ts",
"../services/codeFixProvider.ts",
"../services/refactorProvider.ts",
"../services/codefixes/addMissingInvocationForDecorator.ts",
"../services/codefixes/annotateWithTypeFromJSDoc.ts",
"../services/codefixes/convertFunctionToEs6Class.ts",
"../services/codefixes/convertToEs6Module.ts",
"../services/codefixes/correctQualifiedNameToIndexedAccessType.ts",
"../services/codefixes/fixClassIncorrectlyImplementsInterface.ts",
"../services/codefixes/importFixes.ts",
"../services/codefixes/fixSpelling.ts",
"../services/codefixes/fixAddMissingMember.ts",
"../services/codefixes/fixCannotFindModule.ts",
"../services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts",
"../services/codefixes/fixClassSuperMustPrecedeThisAccess.ts",
"../services/codefixes/fixConstructorForDerivedNeedSuperCall.ts",
"../services/codefixes/fixExtendsInterfaceBecomesImplements.ts",
"../services/codefixes/fixForgottenThisPropertyAccess.ts",
"../services/codefixes/fixUnusedIdentifier.ts",
"../services/codefixes/fixUnreachableCode.ts",
"../services/codefixes/fixUnusedLabel.ts",
"../services/codefixes/fixJSDocTypes.ts",
"../services/codefixes/fixAwaitInSyncFunction.ts",
"../services/codefixes/disableJsDiagnostics.ts",
"../services/codefixes/helpers.ts",
"../services/codefixes/inferFromUsage.ts",
"../services/codefixes/fixInvalidImportSyntax.ts",
"../services/codefixes/fixStrictClassInitialization.ts",
"../services/codefixes/requireInTs.ts",
"../services/codefixes/useDefaultImport.ts",
"../services/codefixes/fixAddModuleReferTypeMissingTypeof.ts",
"../services/codefixes/convertToMappedObjectType.ts",
"../services/refactors/convertImport.ts",
"../services/refactors/extractSymbol.ts",
"../services/refactors/generateGetAccessorAndSetAccessor.ts",
"../services/refactors/moveToNewFile.ts",
"../services/sourcemaps.ts",
"../services/services.ts",
"../services/breakpoints.ts",
"../services/transform.ts",
"../services/shims.ts",
"types.ts",
"shared.ts",
"utilities.ts",
@ -135,7 +24,6 @@
"project.ts",
"editorServices.ts",
"session.ts",
"scriptVersionCache.ts",
"server.ts"
"scriptVersionCache.ts"
]
}

View File

@ -1,146 +0,0 @@
{
"compilerOptions": {
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"preserveConstEnums": true,
"pretty": true,
"outFile": "../../built/local/tsserverlibrary.js",
"sourceMap": true,
"stripInternal": true,
"target": "es5",
"noUnusedLocals": true,
"noUnusedParameters": true,
"declaration": true,
"types": []
},
"files": [
"../compiler/types.ts",
"../compiler/performance.ts",
"../compiler/core.ts",
"../compiler/sys.ts",
"../compiler/diagnosticInformationMap.generated.ts",
"../compiler/scanner.ts",
"../compiler/utilities.ts",
"../compiler/parser.ts",
"../compiler/binder.ts",
"../compiler/symbolWalker.ts",
"../compiler/moduleNameResolver.ts",
"../compiler/checker.ts",
"../compiler/factory.ts",
"../compiler/visitor.ts",
"../compiler/transformers/utilities.ts",
"../compiler/transformers/destructuring.ts",
"../compiler/transformers/ts.ts",
"../compiler/transformers/es2017.ts",
"../compiler/transformers/esnext.ts",
"../compiler/transformers/jsx.ts",
"../compiler/transformers/es2016.ts",
"../compiler/transformers/es2015.ts",
"../compiler/transformers/es5.ts",
"../compiler/transformers/generators.ts",
"../compiler/transformers/module/module.ts",
"../compiler/transformers/module/system.ts",
"../compiler/transformers/module/es2015.ts",
"../compiler/transformers/declarations/diagnostics.ts",
"../compiler/transformers/declarations.ts",
"../compiler/transformer.ts",
"../compiler/sourcemap.ts",
"../compiler/comments.ts",
"../compiler/emitter.ts",
"../compiler/watchUtilities.ts",
"../compiler/program.ts",
"../compiler/builderState.ts",
"../compiler/builder.ts",
"../compiler/resolutionCache.ts",
"../compiler/moduleSpecifiers.ts",
"../compiler/watch.ts",
"../compiler/commandLineParser.ts",
"../services/types.ts",
"../services/utilities.ts",
"../services/classifier.ts",
"../services/pathCompletions.ts",
"../services/completions.ts",
"../services/documentHighlights.ts",
"../services/documentRegistry.ts",
"../services/importTracker.ts",
"../services/findAllReferences.ts",
"../services/getEditsForFileRename.ts",
"../services/goToDefinition.ts",
"../services/jsDoc.ts",
"../services/semver.ts",
"../services/jsTyping.ts",
"../services/navigateTo.ts",
"../services/navigationBar.ts",
"../services/organizeImports.ts",
"../services/getEditsForFileRename.ts",
"../services/outliningElementsCollector.ts",
"../services/patternMatcher.ts",
"../services/preProcess.ts",
"../services/rename.ts",
"../services/signatureHelp.ts",
"../services/suggestionDiagnostics.ts",
"../services/symbolDisplay.ts",
"../services/transpile.ts",
"../services/formatting/formattingContext.ts",
"../services/formatting/formattingScanner.ts",
"../services/formatting/rule.ts",
"../services/formatting/rules.ts",
"../services/formatting/rulesMap.ts",
"../services/formatting/formatting.ts",
"../services/formatting/smartIndenter.ts",
"../services/textChanges.ts",
"../services/codeFixProvider.ts",
"../services/refactorProvider.ts",
"../services/codefixes/addMissingInvocationForDecorator.ts",
"../services/codefixes/annotateWithTypeFromJSDoc.ts",
"../services/codefixes/convertFunctionToEs6Class.ts",
"../services/codefixes/convertToEs6Module.ts",
"../services/codefixes/correctQualifiedNameToIndexedAccessType.ts",
"../services/codefixes/fixClassIncorrectlyImplementsInterface.ts",
"../services/codefixes/importFixes.ts",
"../services/codefixes/fixSpelling.ts",
"../services/codefixes/fixAddMissingMember.ts",
"../services/codefixes/fixCannotFindModule.ts",
"../services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts",
"../services/codefixes/fixClassSuperMustPrecedeThisAccess.ts",
"../services/codefixes/fixConstructorForDerivedNeedSuperCall.ts",
"../services/codefixes/fixExtendsInterfaceBecomesImplements.ts",
"../services/codefixes/fixForgottenThisPropertyAccess.ts",
"../services/codefixes/fixUnusedIdentifier.ts",
"../services/codefixes/fixUnreachableCode.ts",
"../services/codefixes/fixUnusedLabel.ts",
"../services/codefixes/fixJSDocTypes.ts",
"../services/codefixes/fixAwaitInSyncFunction.ts",
"../services/codefixes/disableJsDiagnostics.ts",
"../services/codefixes/helpers.ts",
"../services/codefixes/inferFromUsage.ts",
"../services/codefixes/fixInvalidImportSyntax.ts",
"../services/codefixes/fixStrictClassInitialization.ts",
"../services/codefixes/requireInTs.ts",
"../services/codefixes/useDefaultImport.ts",
"../services/codefixes/fixAddModuleReferTypeMissingTypeof.ts",
"../services/codefixes/convertToMappedObjectType.ts",
"../services/refactors/convertImport.ts",
"../services/refactors/extractSymbol.ts",
"../services/refactors/generateGetAccessorAndSetAccessor.ts",
"../services/refactors/moveToNewFile.ts",
"../services/sourcemaps.ts",
"../services/services.ts",
"../services/breakpoints.ts",
"../services/transform.ts",
"../services/shims.ts",
"types.ts",
"shared.ts",
"utilities.ts",
"protocol.ts",
"scriptInfo.ts",
"typingsCache.ts",
"project.ts",
"editorServices.ts",
"session.ts",
"scriptVersionCache.ts"
]
}

View File

@ -1,32 +0,0 @@
{
"extends": "../../tsconfig-base",
"compilerOptions": {
"removeComments": true,
"outFile": "../../../built/local/typingsInstaller.js",
"types": [
"node"
],
"lib": [
"es6",
"scripthost"
]
},
"files": [
"../../compiler/types.ts",
"../../compiler/performance.ts",
"../../compiler/core.ts",
"../../compiler/sys.ts",
"../../compiler/diagnosticInformationMap.generated.ts",
"../../compiler/utilities.ts",
"../../compiler/scanner.ts",
"../../compiler/parser.ts",
"../../compiler/commandLineParser.ts",
"../../compiler/moduleNameResolver.ts",
"../../services/semver.ts",
"../../services/jsTyping.ts",
"../types.ts",
"../shared.ts",
"typingsInstaller.ts",
"nodeTypingsInstaller.ts"
]
}

View File

@ -1,53 +1,14 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"removeComments": false,
"outFile": "../../built/local/typescriptServices.js",
"declaration": true
"outFile": "../../built/local/typescriptServices.js"
},
"references": [
{ "path": "../core" },
{ "path": "../parser" },
{ "path": "../compiler" }
],
"files": [
"../compiler/types.ts",
"../compiler/performance.ts",
"../compiler/core.ts",
"../compiler/sys.ts",
"../compiler/diagnosticInformationMap.generated.ts",
"../compiler/scanner.ts",
"../compiler/utilities.ts",
"../compiler/parser.ts",
"../compiler/binder.ts",
"../compiler/symbolWalker.ts",
"../compiler/moduleNameResolver.ts",
"../compiler/checker.ts",
"../compiler/factory.ts",
"../compiler/visitor.ts",
"../compiler/transformers/utilities.ts",
"../compiler/transformers/destructuring.ts",
"../compiler/transformers/ts.ts",
"../compiler/transformers/es2017.ts",
"../compiler/transformers/esnext.ts",
"../compiler/transformers/jsx.ts",
"../compiler/transformers/es2016.ts",
"../compiler/transformers/es2015.ts",
"../compiler/transformers/es5.ts",
"../compiler/transformers/generators.ts",
"../compiler/transformers/module/module.ts",
"../compiler/transformers/module/system.ts",
"../compiler/transformers/module/es2015.ts",
"../compiler/transformers/declarations/diagnostics.ts",
"../compiler/transformers/declarations.ts",
"../compiler/transformer.ts",
"../compiler/sourcemap.ts",
"../compiler/comments.ts",
"../compiler/emitter.ts",
"../compiler/watchUtilities.ts",
"../compiler/program.ts",
"../compiler/builderState.ts",
"../compiler/builder.ts",
"../compiler/resolutionCache.ts",
"../compiler/moduleSpecifiers.ts",
"../compiler/watch.ts",
"../compiler/commandLineParser.ts",
"types.ts",
"utilities.ts",
"classifier.ts",

View File

@ -1,11 +1,3 @@
/// <reference path="harness.ts" />
/// <reference path="runnerbase.ts" />
/// <reference path="typeWriter.ts" />
/// <reference path="./vpath.ts" />
/// <reference path="./vfs.ts" />
/// <reference path="./compiler.ts" />
/// <reference path="./documents.ts" />
const enum CompilerTestType {
Conformance,
Regressions,

View File

@ -1,5 +1,3 @@
/// <reference path="harness.ts"/>
/// <reference path="runnerbase.ts" />
const fs = require("fs");
const path = require("path");
const del = require("del");

View File

@ -1,34 +1,23 @@
///<reference path="fourslash.ts" />
///<reference path="harness.ts"/>
///<reference path="runnerbase.ts" />
const enum FourSlashTestType {
Native,
Shims,
ShimsWithPreprocess,
Server
}
class FourSlashRunner extends RunnerBase {
protected basePath: string;
protected testSuiteName: TestRunnerKind;
constructor(private testType: FourSlashTestType) {
constructor(private testType: FourSlash.FourSlashTestType) {
super();
switch (testType) {
case FourSlashTestType.Native:
case FourSlash.FourSlashTestType.Native:
this.basePath = "tests/cases/fourslash";
this.testSuiteName = "fourslash";
break;
case FourSlashTestType.Shims:
case FourSlash.FourSlashTestType.Shims:
this.basePath = "tests/cases/fourslash/shims";
this.testSuiteName = "fourslash-shims";
break;
case FourSlashTestType.ShimsWithPreprocess:
case FourSlash.FourSlashTestType.ShimsWithPreprocess:
this.basePath = "tests/cases/fourslash/shims-pp";
this.testSuiteName = "fourslash-shims-pp";
break;
case FourSlashTestType.Server:
case FourSlash.FourSlashTestType.Server:
this.basePath = "tests/cases/fourslash/server";
this.testSuiteName = "fourslash-server";
break;
@ -72,7 +61,7 @@ class FourSlashRunner extends RunnerBase {
}
class GeneratedFourslashRunner extends FourSlashRunner {
constructor(testType: FourSlashTestType) {
constructor(testType: FourSlash.FourSlashTestType) {
super(testType);
this.basePath += "/generated/";
}

View File

@ -1,11 +1,3 @@
/// <reference path="harness.ts" />
/// <reference path="runnerbase.ts" />
/// <reference path="./vpath.ts" />
/// <reference path="./vfs.ts" />
/// <reference path="./documents.ts" />
/// <reference path="./compiler.ts" />
/// <reference path="./fakes.ts" />
namespace project {
// Test case is json of below type in tests/cases/project/
interface ProjectRunnerTestCase {

View File

@ -1,27 +1,3 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/// <reference path="test262Runner.ts" />
/// <reference path="compilerRunner.ts" />
/// <reference path="fourslashRunner.ts" />
/// <reference path="projectsRunner.ts" />
/// <reference path="rwcRunner.ts" />
/// <reference path="externalCompileRunner.ts" />
/// <reference path="harness.ts" />
/// <reference path="./parallel/shared.ts" />
let runners: RunnerBase[] = [];
let iterations = 1;
@ -47,13 +23,13 @@ function createRunner(kind: TestRunnerKind): RunnerBase {
case "compiler":
return new CompilerBaselineRunner(CompilerTestType.Regressions);
case "fourslash":
return new FourSlashRunner(FourSlashTestType.Native);
return new FourSlashRunner(FourSlash.FourSlashTestType.Native);
case "fourslash-shims":
return new FourSlashRunner(FourSlashTestType.Shims);
return new FourSlashRunner(FourSlash.FourSlashTestType.Shims);
case "fourslash-shims-pp":
return new FourSlashRunner(FourSlashTestType.ShimsWithPreprocess);
return new FourSlashRunner(FourSlash.FourSlashTestType.ShimsWithPreprocess);
case "fourslash-server":
return new FourSlashRunner(FourSlashTestType.Server);
return new FourSlashRunner(FourSlash.FourSlashTestType.Server);
case "project":
return new project.ProjectRunner();
case "rwc":
@ -166,19 +142,19 @@ function handleTestConfig() {
runners.push(new project.ProjectRunner());
break;
case "fourslash":
runners.push(new FourSlashRunner(FourSlashTestType.Native));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Native));
break;
case "fourslash-shims":
runners.push(new FourSlashRunner(FourSlashTestType.Shims));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Shims));
break;
case "fourslash-shims-pp":
runners.push(new FourSlashRunner(FourSlashTestType.ShimsWithPreprocess));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.ShimsWithPreprocess));
break;
case "fourslash-server":
runners.push(new FourSlashRunner(FourSlashTestType.Server));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Server));
break;
case "fourslash-generated":
runners.push(new GeneratedFourslashRunner(FourSlashTestType.Native));
runners.push(new GeneratedFourslashRunner(FourSlash.FourSlashTestType.Native));
break;
case "rwc":
runners.push(new RWCRunner());
@ -208,10 +184,10 @@ function handleTestConfig() {
}
// language services
runners.push(new FourSlashRunner(FourSlashTestType.Native));
runners.push(new FourSlashRunner(FourSlashTestType.Shims));
runners.push(new FourSlashRunner(FourSlashTestType.ShimsWithPreprocess));
runners.push(new FourSlashRunner(FourSlashTestType.Server));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Native));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Shims));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.ShimsWithPreprocess));
runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Server));
// runners.push(new GeneratedFourslashRunner());
// CRON-only tests

View File

@ -1,7 +1,3 @@
/// <reference path="harness.ts"/>
/// <reference path="runnerbase.ts" />
/// <reference path="loggedIO.ts" />
/// <reference path="..\compiler\commandLineParser.ts"/>
// In harness baselines, null is different than undefined. See `generateActual` in `harness.ts`.
/* tslint:disable:no-null-keyword */

View File

@ -1,5 +1,3 @@
/// <reference path="harness.ts" />
/// <reference path="runnerbase.ts" />
// In harness baselines, null is different than undefined. See `generateActual` in `harness.ts`.
/* tslint:disable:no-null-keyword */

View File

@ -0,0 +1,39 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/run.js",
"composite": false,
"declaration": false,
"types": [
"node", "mocha", "chai"
],
"lib": [
"es6",
"scripthost"
]
},
"references": [
{ "path": "../core", "prepend": true },
{ "path": "../parser", "prepend": true },
{ "path": "../compiler", "prepend": true },
{ "path": "../services", "prepend": true },
{ "path": "../server", "prepend": true },
{ "path": "../harness", "prepend": true },
{ "path": "../typingsInstallerCore", "prepend": true }
],
"files": [
"fourslashRunner.ts",
"compilerRunner.ts",
"projectsRunner.ts",
"rwcRunner.ts",
"externalCompileRunner.ts",
"test262Runner.ts",
"parallel/host.ts",
"parallel/worker.ts",
"parallel/shared.ts",
"runner.ts"
]
}

13
src/tsc/tsconfig.json Normal file
View File

@ -0,0 +1,13 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/tsc.js"
},
"files": [
"tsc.ts"
],
"references": [
{ "path": "../core", "prepend": true },
{ "path": "../compiler", "prepend": true }
]
}

View File

@ -1,19 +1,24 @@
{
"compilerOptions": {
"pretty": true,
"lib": ["es5"],
"target": "es5",
"declaration": true,
"sourceMap": true,
"composite": true,
"noEmitOnError": true,
"strictNullChecks": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"alwaysStrict": true,
"pretty": true,
"preserveConstEnums": true,
"stripInternal": true,
"sourceMap": true,
"target": "es5",
"newLine": "lf",
"types": []
}
}

7
src/tsconfig.json Normal file
View File

@ -0,0 +1,7 @@
{
"files": [],
"include": [],
"references": [
{ "path": "./tsc" }
]
}

View File

@ -0,0 +1,19 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/tsserver.js",
"types": [
"node"
]
},
"files": [
"server.ts"
],
"references": [
{ "path": "../core", "prepend": true },
{ "path": "../compiler", "prepend": true },
{ "path": "../services", "prepend": true },
{ "path": "../server", "prepend": true }
]
}

View File

@ -0,0 +1,28 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"removeComments": true,
"outFile": "../built/local/typingsInstaller.js",
"types": [
"node"
],
"lib": [
"es6",
"scripthost"
]
},
"references": [
{ "path": "../core", "prepend": true },
{ "path": "../parser", "prepend": true },
/* todo - only need jsTyping and semver from this compilation! */
{ "path": "../compiler", "prepend": true },
{ "path": "../services", "prepend": true },
{ "path": "../server", "prepend": true },
{ "path": "../typingsInstallerCore", "prepend": true }
],
"files": [
"nodeTypingsInstaller.ts"
]
}

View File

@ -0,0 +1,25 @@
{
"extends": "../tsconfig-base",
"compilerOptions": {
"outFile": "../../built/local/typingsInstallerCore.js",
"types": [
"node"
],
"lib": [
"es6",
"scripthost"
]
},
"references": [
{ "path": "../core" },
{ "path": "../parser" },
/* todo - only need jsTyping and semver from this compilation! */
{ "path": "../compiler" },
{ "path": "../services" },
{ "path": "../server" }
],
"files": [
"typingsInstaller.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
describe("assert", () => {
it("deepEqual", () => {

View File

@ -1,4 +1,3 @@
/// <reference path="../harness.ts" />
namespace ts {
describe("base64", () => {
describe("base64decode", () => {

View File

@ -1,5 +1,3 @@
/// <reference path="reuseProgramStructure.ts" />
namespace ts {
describe("builder", () => {
it("emits dependent files", () => {

View File

@ -1,5 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
describe("cancellableLanguageServiceOperations", () => {
const file = `

View File

@ -1,6 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="..\..\compiler\commandLineParser.ts" />
namespace ts {
describe("parseCommandLine", () => {

View File

@ -1,7 +1,3 @@
/// <reference path="../harness.ts" />
/// <reference path="./tsserverProjectSystem.ts" />
/// <reference path="../../server/typingsInstaller/typingsInstaller.ts" />
namespace ts.projectSystem {
import CommandNames = server.CommandNames;
const nullCancellationToken = server.nullCancellationToken;

View File

@ -1,7 +1,3 @@
/// <reference path="../harness.ts" />
/// <reference path="../vfs.ts" />
/// <reference path="../compiler.ts" />
namespace ts {
function createFileSystem(ignoreCase: boolean, cwd: string, root: string) {
return new vfs.FileSystem(ignoreCase, {

View File

@ -1,8 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="..\..\compiler\commandLineParser.ts" />
/// <reference path="../compiler.ts" />
/// <reference path="../vfs.ts" />
namespace ts {
describe("convertCompilerOptionsFromJson", () => {
function assertCompilerOptions(json: any, configFileName: string, expectedResult: { compilerOptions: CompilerOptions, errors: Diagnostic[] }) {

View File

@ -1,5 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
describe("convertToBase64", () => {
function runTest(input: string): void {

View File

@ -1,8 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="..\..\compiler\commandLineParser.ts" />
/// <reference path="../compiler.ts" />
/// <reference path="../vfs.ts" />
namespace ts {
interface ExpectedResult { typeAcquisition: TypeAcquisition; errors: Diagnostic[]; }
describe("convertTypeAcquisitionFromJson", () => {

View File

@ -1,6 +1,3 @@
/// <reference path="..\..\compiler\emitter.ts" />
/// <reference path="..\harness.ts" />
namespace ts {
describe("customTransforms", () => {
function emitsCorrectly(name: string, sources: { file: string, text: string }[], customTransformers: CustomTransformers, options: CompilerOptions = {}) {

View File

@ -1,5 +1,3 @@
/// <reference path="extractTestHelpers.ts" />
namespace ts {
describe("extractConstants", () => {
testExtractConstant("extractConstant_TopLevel",

View File

@ -1,5 +1,3 @@
/// <reference path="extractTestHelpers.ts" />
namespace ts {
describe("extractFunctions", () => {
testExtractFunction("extractFunction1",

View File

@ -1,5 +1,3 @@
/// <reference path="extractTestHelpers.ts" />
namespace ts {
function testExtractRangeFailed(caption: string, s: string, expectedErrors: string[]) {
return it(caption, () => {

View File

@ -1,6 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="tsserverProjectSystem.ts" />
namespace ts {
interface Range {
pos: number;

View File

@ -1,4 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
describe("hostNewLineSupport", () => {
function testLSWithFiles(settings: CompilerOptions, files: Harness.Compiler.TestFile[]) {

View File

@ -1,6 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="..\..\compiler\parser.ts" />
namespace ts {
ts.disableIncrementalParsing = false; // tslint:disable-line no-unnecessary-qualifier (make clear this is a global mutation!)

View File

@ -1,6 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="..\..\compiler\commandLineParser.ts" />
namespace ts {
describe("initTSConfig", () => {
function initTSConfigCorrectly(name: string, commandLinesArgs: string[]) {

View File

@ -1,6 +1,3 @@
/// <reference path="..\..\compiler\parser.ts" />
/// <reference path="..\harness.ts" />
namespace ts {
describe("JSDocParsing", () => {
describe("TypeExpressions", () => {

View File

@ -1,5 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
describe("languageService", () => {
const files: {[index: string]: string} = {

View File

@ -1,7 +1,3 @@
/// <reference path="../harness.ts" />
/// <reference path="../compiler.ts" />
/// <reference path="../vfs.ts" />
namespace ts {
const caseInsensitiveBasePath = "c:/dev/";
const caseInsensitiveTsconfigPath = "c:/dev/tsconfig.json";

View File

@ -1,5 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
export function checkResolvedModule(expected: ResolvedModuleFull | undefined, actual: ResolvedModuleFull): boolean {
if (!expected === !actual) {

View File

@ -1,7 +1,3 @@
/// <reference path="..\..\..\src\harness\harness.ts" />
/// <reference path="..\..\..\src\harness\vfs.ts" />
namespace ts {
describe("Organize imports", () => {
describe("Sort imports", () => {

View File

@ -1,6 +1,3 @@
/// <reference path="..\..\compiler\emitter.ts" />
/// <reference path="..\harness.ts" />
namespace ts {
describe("PrinterAPI", () => {
function makePrintsCorrectly(prefix: string) {

View File

@ -1,7 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="../documents.ts" />
/// <reference path="../vfs.ts" />
namespace ts {
function verifyMissingFilePaths(missingPaths: ReadonlyArray<Path>, expected: ReadonlyArray<string>) {
assert.isDefined(missingPaths);

View File

@ -1,4 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
describe("programNoParseFalsyFileNames", () => {
let program: Program;

View File

@ -1,7 +1,3 @@
/// <reference path="../harness.ts" />
/// <reference path="./tsserverProjectSystem.ts" />
/// <reference path="../../server/typingsInstaller/typingsInstaller.ts" />
namespace ts.projectSystem {
describe("Project errors", () => {
function checkProjectErrors(projectFiles: server.ProjectFilesWithTSDiagnostics, expectedErrors: ReadonlyArray<string>): void {

View File

@ -1,6 +1,3 @@
/// <reference path="../harness.ts" />
/// <reference path="../../compiler/commandLineParser.ts" />
namespace ts {
interface TestProjectSpecification {
configFileName?: string;

View File

@ -1,5 +1,3 @@
/// <reference path="../harness.ts" />
describe("Public APIs", () => {
function verifyApi(fileName: string) {
const builtFile = `built/local/${fileName}`;

View File

@ -1,6 +1,3 @@
/// <reference path="..\harness.ts" />
/// <reference path="..\..\harness\harnessLanguageService.ts" />
namespace ts {
const enum ChangedPart {

View File

@ -1,5 +1,3 @@
/// <reference path="..\..\harnessLanguageService.ts" />
// tslint:disable no-invalid-template-strings (lots of tests use quoted code)
interface ClassificationEntry {

View File

@ -1,5 +1,3 @@
/// <reference path="..\..\harness.ts" />
describe("DocumentRegistry", () => {
it("documents are shared between projects", () => {
const documentRegistry = ts.createDocumentRegistry();

View File

@ -1,5 +1,3 @@
/// <reference path="..\..\..\services\patternMatcher.ts" />
describe("PatternMatcher", () => {
describe("BreakIntoCharacterSpans", () => {
it("EmptyIdentifier", () => {

View File

@ -1,5 +1,3 @@
/// <reference path="..\..\harnessLanguageService.ts" />
describe("PreProcessFile:", () => {
function test(sourceText: string, readImportFile: boolean, detectJavaScriptImports: boolean, expectedPreProcess: ts.PreProcessedFileInfo): void {
const resultPreProcess = ts.preProcessFile(sourceText, readImportFile, detectJavaScriptImports);

View File

@ -1,5 +1,3 @@
/// <reference path="..\harness.ts" />
const expect: typeof _chai.expect = _chai.expect;
namespace ts.server {

View File

@ -1,5 +1,3 @@
/// <reference path="..\harness.ts" />
namespace ts {
describe("Symbol Walker", () => {
function test(description: string, source: string, verifier: (file: SourceFile, checker: TypeChecker) => void) {

View File

@ -1,6 +1,3 @@
/// <reference path="../harness.ts" />
/// <reference path="./tsserverProjectSystem.ts" />
namespace ts.projectSystem {
describe("project telemetry", () => {
it("does nothing for inferred project", () => {

View File

@ -1,7 +1,3 @@
/// <reference path="..\..\compiler\emitter.ts" />
/// <reference path="..\..\services\textChanges.ts" />
/// <reference path="..\harness.ts" />
// Some tests have trailing whitespace
// tslint:disable trim-trailing-whitespace

View File

@ -1,7 +1,3 @@
/// <reference path="../harness.ts" />
/// <reference path="../../server/scriptVersionCache.ts"/>
/// <reference path="./tsserverProjectSystem.ts" />
namespace ts.textStorage {
describe("Text storage", () => {
const f = {

Some files were not shown because too many files have changed in this diff Show More