mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #24850 from RyanCavanaugh/projzilla
Convert src to project references
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig-base",
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../built/local/",
|
||||
"composite": false,
|
||||
"declaration": false,
|
||||
"declarationMap": false,
|
||||
"removeComments": true,
|
||||
"module": "commonjs",
|
||||
"types": [
|
||||
@@ -349,7 +349,7 @@ namespace ts {
|
||||
|
||||
output += host.getNewLine();
|
||||
}
|
||||
return output + host.getNewLine();
|
||||
return output;
|
||||
}
|
||||
|
||||
export function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain | undefined, newLine: string): string {
|
||||
|
||||
@@ -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,10 +33,10 @@ namespace ts {
|
||||
resolvedFileName: string | undefined;
|
||||
}
|
||||
|
||||
interface ResolvedModuleWithFailedLookupLocations extends ts.ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
|
||||
interface CachedResolvedModuleWithFailedLookupLocations extends ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
|
||||
}
|
||||
|
||||
interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
|
||||
interface CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
|
||||
}
|
||||
|
||||
export interface ResolutionCacheHost extends ModuleResolutionHost {
|
||||
@@ -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,
|
||||
@@ -95,8 +95,8 @@ namespace ts {
|
||||
resolutionHost.getCanonicalFileName
|
||||
);
|
||||
|
||||
const resolvedTypeReferenceDirectives = createMap<Map<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
|
||||
const perDirectoryResolvedTypeReferenceDirectives = createMap<Map<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
|
||||
const resolvedTypeReferenceDirectives = createMap<Map<CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
|
||||
const perDirectoryResolvedTypeReferenceDirectives = createMap<Map<CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
|
||||
|
||||
/**
|
||||
* These are the extensions that failed lookup files will have by default,
|
||||
@@ -133,11 +133,11 @@ namespace ts {
|
||||
clear
|
||||
};
|
||||
|
||||
function getResolvedModule(resolution: ResolvedModuleWithFailedLookupLocations) {
|
||||
function getResolvedModule(resolution: CachedResolvedModuleWithFailedLookupLocations) {
|
||||
return resolution.resolvedModule;
|
||||
}
|
||||
|
||||
function getResolvedTypeReferenceDirective(resolution: ResolvedTypeReferenceDirectiveWithFailedLookupLocations) {
|
||||
function getResolvedTypeReferenceDirective(resolution: CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations) {
|
||||
return resolution.resolvedTypeReferenceDirective;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
@@ -319,7 +319,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[] {
|
||||
return resolveNamesWithLocalCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolvedTypeReferenceDirective>(
|
||||
return resolveNamesWithLocalCache<CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolvedTypeReferenceDirective>(
|
||||
typeDirectiveNames, containingFile,
|
||||
resolvedTypeReferenceDirectives, perDirectoryResolvedTypeReferenceDirectives,
|
||||
resolveTypeReferenceDirective, getResolvedTypeReferenceDirective,
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
{
|
||||
"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",
|
||||
"checker.ts",
|
||||
"factory.ts",
|
||||
"visitor.ts",
|
||||
@@ -46,8 +35,10 @@
|
||||
"resolutionCache.ts",
|
||||
"moduleSpecifiers.ts",
|
||||
"watch.ts",
|
||||
"commandLineParser.ts",
|
||||
"tsbuild.ts",
|
||||
"tsc.ts",
|
||||
"tsbuild.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../core" },
|
||||
{ "path": "../parser" }
|
||||
]
|
||||
}
|
||||
|
||||
+144
-1630
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"outFile": "../../built/local/core.js"
|
||||
},
|
||||
"files": [
|
||||
"performance.ts",
|
||||
"core.ts"
|
||||
],
|
||||
"references": [ ]
|
||||
}
|
||||
@@ -1,30 +1,15 @@
|
||||
//
|
||||
// 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 +1302,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,
|
||||
|
||||
+1
-29
@@ -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 */
|
||||
|
||||
@@ -35,7 +7,7 @@ var assert: typeof _chai.assert = _chai.assert;
|
||||
{
|
||||
// chai's builtin `assert.isFalse` is featureful but slow - we don't use those features,
|
||||
// so we'll just overwrite it as an alterative to migrating a bunch of code off of chai
|
||||
assert.isFalse = (expr, msg) => { if (expr as any as boolean !== false) throw new Error(msg); };
|
||||
assert.isFalse = (expr: any, msg: string) => { if (expr !== false) throw new Error(msg); };
|
||||
|
||||
const assertDeepImpl = assert.deepEqual;
|
||||
assert.deepEqual = (a, b, msg) => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+15
-149
@@ -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,139 +10,17 @@
|
||||
"scripthost"
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../core" },
|
||||
{ "path": "../parser" },
|
||||
{ "path": "../compiler" },
|
||||
{ "path": "../services" },
|
||||
{ "path": "../jsTyping" },
|
||||
{ "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/refactors/addOrRemoveBracesToArrowFunction.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",
|
||||
@@ -153,25 +29,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"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="harness.ts" />
|
||||
|
||||
namespace ts.TestFSWithWatch {
|
||||
export const libFile: File = {
|
||||
path: "/a/lib/lib.d.ts",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"outFile": "../../built/local/jsTyping.js",
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"lib": [
|
||||
"es6",
|
||||
"scripthost"
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../core" },
|
||||
{ "path": "../parser" }
|
||||
],
|
||||
"files": [
|
||||
"shared.ts",
|
||||
"types.ts",
|
||||
"jsTyping.ts",
|
||||
"semver.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
declare namespace ts.server {
|
||||
export type ActionSet = "action::set";
|
||||
export type ActionInvalidate = "action::invalidate";
|
||||
export type ActionPackageInstalled = "action::packageInstalled";
|
||||
export type EventTypesRegistry = "event::typesRegistry";
|
||||
export type EventBeginInstallTypes = "event::beginInstallTypes";
|
||||
export type EventEndInstallTypes = "event::endInstallTypes";
|
||||
export type EventInitializationFailed = "event::initializationFailed";
|
||||
|
||||
export interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
|
||||
" __sortedArrayBrand": any;
|
||||
}
|
||||
|
||||
export interface TypingInstallerResponse {
|
||||
readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
|
||||
}
|
||||
|
||||
export interface TypingInstallerRequestWithProjectName {
|
||||
readonly projectName: string;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export type TypingInstallerRequestUnion = DiscoverTypings | CloseProject | TypesRegistryRequest | InstallPackageRequest;
|
||||
|
||||
export interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
|
||||
readonly fileNames: string[];
|
||||
readonly projectRootPath: Path;
|
||||
readonly compilerOptions: CompilerOptions;
|
||||
readonly typeAcquisition: TypeAcquisition;
|
||||
readonly unresolvedImports: SortedReadonlyArray<string>;
|
||||
readonly cachePath?: string;
|
||||
readonly kind: "discover";
|
||||
}
|
||||
|
||||
export interface CloseProject extends TypingInstallerRequestWithProjectName {
|
||||
readonly kind: "closeProject";
|
||||
}
|
||||
|
||||
export interface TypesRegistryRequest {
|
||||
readonly kind: "typesRegistry";
|
||||
}
|
||||
|
||||
export interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
|
||||
readonly kind: "installPackage";
|
||||
readonly fileName: Path;
|
||||
readonly packageName: string;
|
||||
readonly projectRootPath: Path;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface TypesRegistryResponse extends TypingInstallerResponse {
|
||||
readonly kind: EventTypesRegistry;
|
||||
readonly typesRegistry: MapLike<MapLike<string>>;
|
||||
}
|
||||
|
||||
export interface PackageInstalledResponse extends ProjectResponse {
|
||||
readonly kind: ActionPackageInstalled;
|
||||
readonly success: boolean;
|
||||
readonly message: string;
|
||||
}
|
||||
|
||||
export interface InitializationFailedResponse extends TypingInstallerResponse {
|
||||
readonly kind: EventInitializationFailed;
|
||||
readonly message: string;
|
||||
}
|
||||
|
||||
export interface ProjectResponse extends TypingInstallerResponse {
|
||||
readonly projectName: string;
|
||||
}
|
||||
|
||||
export interface InvalidateCachedTypings extends ProjectResponse {
|
||||
readonly kind: ActionInvalidate;
|
||||
}
|
||||
|
||||
export interface InstallTypes extends ProjectResponse {
|
||||
readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
|
||||
readonly eventId: number;
|
||||
readonly typingsInstallerVersion: string;
|
||||
readonly packagesToInstall: ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
export interface BeginInstallTypes extends InstallTypes {
|
||||
readonly kind: EventBeginInstallTypes;
|
||||
}
|
||||
|
||||
export interface EndInstallTypes extends InstallTypes {
|
||||
readonly kind: EventEndInstallTypes;
|
||||
readonly installSuccess: boolean;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface InstallTypingHost extends JsTyping.TypingResolutionHost {
|
||||
useCaseSensitiveFileNames: boolean;
|
||||
writeFile(path: string, content: string): void;
|
||||
createDirectory(path: string): void;
|
||||
watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number): FileWatcher;
|
||||
watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher;
|
||||
}
|
||||
|
||||
export interface SetTypings extends ProjectResponse {
|
||||
readonly typeAcquisition: TypeAcquisition;
|
||||
readonly compilerOptions: CompilerOptions;
|
||||
readonly typings: string[];
|
||||
readonly unresolvedImports: SortedReadonlyArray<string>;
|
||||
readonly kind: ActionSet;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export type TypingInstallerResponseUnion = SetTypings | InvalidateCachedTypings | TypesRegistryResponse | PackageInstalledResponse | InstallTypes | InitializationFailedResponse;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"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",
|
||||
"moduleNameResolver.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../core" }
|
||||
]
|
||||
}
|
||||
@@ -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
+9
-122
@@ -2,133 +2,21 @@
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"removeComments": true,
|
||||
"outFile": "../../built/local/tsserver.js",
|
||||
"outFile": "../../built/local/server.js",
|
||||
"preserveConstEnums": true,
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../core" },
|
||||
{ "path": "../parser" },
|
||||
{ "path": "../compiler" },
|
||||
{ "path": "../jsTyping" },
|
||||
{ "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/refactors/addOrRemoveBracesToArrowFunction.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",
|
||||
@@ -136,7 +24,6 @@
|
||||
"project.ts",
|
||||
"editorServices.ts",
|
||||
"session.ts",
|
||||
"scriptVersionCache.ts",
|
||||
"server.ts"
|
||||
"scriptVersionCache.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,147 +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/refactors/addOrRemoveBracesToArrowFunction.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"
|
||||
]
|
||||
}
|
||||
@@ -17,112 +17,4 @@ declare namespace ts.server {
|
||||
trace?(s: string): void;
|
||||
require?(initialPath: string, moduleName: string): RequireResult;
|
||||
}
|
||||
|
||||
export interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
|
||||
" __sortedArrayBrand": any;
|
||||
}
|
||||
|
||||
export interface TypingInstallerRequestWithProjectName {
|
||||
readonly projectName: string;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export type TypingInstallerRequestUnion = DiscoverTypings | CloseProject | TypesRegistryRequest | InstallPackageRequest;
|
||||
|
||||
export interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
|
||||
readonly fileNames: string[];
|
||||
readonly projectRootPath: Path;
|
||||
readonly compilerOptions: CompilerOptions;
|
||||
readonly typeAcquisition: TypeAcquisition;
|
||||
readonly unresolvedImports: SortedReadonlyArray<string>;
|
||||
readonly cachePath?: string;
|
||||
readonly kind: "discover";
|
||||
}
|
||||
|
||||
export interface CloseProject extends TypingInstallerRequestWithProjectName {
|
||||
readonly kind: "closeProject";
|
||||
}
|
||||
|
||||
export interface TypesRegistryRequest {
|
||||
readonly kind: "typesRegistry";
|
||||
}
|
||||
|
||||
export interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
|
||||
readonly kind: "installPackage";
|
||||
readonly fileName: Path;
|
||||
readonly packageName: string;
|
||||
readonly projectRootPath: Path;
|
||||
}
|
||||
|
||||
export type ActionSet = "action::set";
|
||||
export type ActionInvalidate = "action::invalidate";
|
||||
export type ActionPackageInstalled = "action::packageInstalled";
|
||||
export type EventTypesRegistry = "event::typesRegistry";
|
||||
export type EventBeginInstallTypes = "event::beginInstallTypes";
|
||||
export type EventEndInstallTypes = "event::endInstallTypes";
|
||||
export type EventInitializationFailed = "event::initializationFailed";
|
||||
|
||||
export interface TypingInstallerResponse {
|
||||
readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
|
||||
}
|
||||
/* @internal */
|
||||
export type TypingInstallerResponseUnion = SetTypings | InvalidateCachedTypings | TypesRegistryResponse | PackageInstalledResponse | InstallTypes | InitializationFailedResponse;
|
||||
|
||||
/* @internal */
|
||||
export interface TypesRegistryResponse extends TypingInstallerResponse {
|
||||
readonly kind: EventTypesRegistry;
|
||||
readonly typesRegistry: MapLike<MapLike<string>>;
|
||||
}
|
||||
|
||||
export interface PackageInstalledResponse extends ProjectResponse {
|
||||
readonly kind: ActionPackageInstalled;
|
||||
readonly success: boolean;
|
||||
readonly message: string;
|
||||
}
|
||||
|
||||
export interface InitializationFailedResponse extends TypingInstallerResponse {
|
||||
readonly kind: EventInitializationFailed;
|
||||
readonly message: string;
|
||||
}
|
||||
|
||||
export interface ProjectResponse extends TypingInstallerResponse {
|
||||
readonly projectName: string;
|
||||
}
|
||||
|
||||
export interface SetTypings extends ProjectResponse {
|
||||
readonly typeAcquisition: TypeAcquisition;
|
||||
readonly compilerOptions: CompilerOptions;
|
||||
readonly typings: string[];
|
||||
readonly unresolvedImports: SortedReadonlyArray<string>;
|
||||
readonly kind: ActionSet;
|
||||
}
|
||||
|
||||
export interface InvalidateCachedTypings extends ProjectResponse {
|
||||
readonly kind: ActionInvalidate;
|
||||
}
|
||||
|
||||
export interface InstallTypes extends ProjectResponse {
|
||||
readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
|
||||
readonly eventId: number;
|
||||
readonly typingsInstallerVersion: string;
|
||||
readonly packagesToInstall: ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
export interface BeginInstallTypes extends InstallTypes {
|
||||
readonly kind: EventBeginInstallTypes;
|
||||
}
|
||||
|
||||
export interface EndInstallTypes extends InstallTypes {
|
||||
readonly kind: EventEndInstallTypes;
|
||||
readonly installSuccess: boolean;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface InstallTypingHost extends JsTyping.TypingResolutionHost {
|
||||
useCaseSensitiveFileNames: boolean;
|
||||
writeFile(path: string, content: string): void;
|
||||
createDirectory(path: string): void;
|
||||
watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number): FileWatcher;
|
||||
watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -1,53 +1,15 @@
|
||||
{
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"removeComments": false,
|
||||
"outFile": "../../built/local/typescriptServices.js",
|
||||
"declaration": true
|
||||
"outFile": "../../built/local/services.js"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../core" },
|
||||
{ "path": "../parser" },
|
||||
{ "path": "../compiler" },
|
||||
{ "path": "../jsTyping" },
|
||||
],
|
||||
"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",
|
||||
@@ -60,8 +22,6 @@
|
||||
"getEditsForFileRename.ts",
|
||||
"goToDefinition.ts",
|
||||
"jsDoc.ts",
|
||||
"semver.ts",
|
||||
"jsTyping.ts",
|
||||
"navigateTo.ts",
|
||||
"navigationBar.ts",
|
||||
"organizeImports.ts",
|
||||
|
||||
@@ -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,
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="harness.ts"/>
|
||||
/// <reference path="runnerbase.ts" />
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const del = require("del");
|
||||
@@ -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/";
|
||||
}
|
||||
@@ -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 {
|
||||
@@ -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
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"outFile": "../../built/local/run.js",
|
||||
"composite": false,
|
||||
"declaration": false,
|
||||
"declarationMap": 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": "../jsTyping", "prepend": true },
|
||||
{ "path": "../server", "prepend": true },
|
||||
{ "path": "../typingsInstallerCore", "prepend": true },
|
||||
{ "path": "../harness", "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",
|
||||
|
||||
"unittests/extractTestHelpers.ts",
|
||||
"unittests/tsserverProjectSystem.ts",
|
||||
"unittests/typingsInstaller.ts",
|
||||
|
||||
"unittests/asserts.ts",
|
||||
"unittests/base64.ts",
|
||||
"unittests/builder.ts",
|
||||
"unittests/cancellableLanguageServiceOperations.ts",
|
||||
"unittests/commandLineParsing.ts",
|
||||
"unittests/compileOnSave.ts",
|
||||
"unittests/configurationExtension.ts",
|
||||
"unittests/convertCompilerOptionsFromJson.ts",
|
||||
"unittests/convertToBase64.ts",
|
||||
"unittests/convertTypeAcquisitionFromJson.ts",
|
||||
"unittests/customTransforms.ts",
|
||||
"unittests/extractConstants.ts",
|
||||
"unittests/extractFunctions.ts",
|
||||
"unittests/extractRanges.ts",
|
||||
"unittests/hostNewLineSupport.ts",
|
||||
"unittests/incrementalParser.ts",
|
||||
"unittests/initializeTSConfig.ts",
|
||||
"unittests/jsDocParsing.ts",
|
||||
"unittests/languageService.ts",
|
||||
"unittests/matchFiles.ts",
|
||||
"unittests/moduleResolution.ts",
|
||||
"unittests/organizeImports.ts",
|
||||
"unittests/paths.ts",
|
||||
"unittests/printer.ts",
|
||||
"unittests/programMissingFiles.ts",
|
||||
"unittests/programNoParseFalsyFileNames.ts",
|
||||
"unittests/projectErrors.ts",
|
||||
"unittests/projectReferences.ts",
|
||||
"unittests/publicApi.ts",
|
||||
"unittests/reuseProgramStructure.ts",
|
||||
"unittests/session.ts",
|
||||
"unittests/symbolWalker.ts",
|
||||
"unittests/telemetry.ts",
|
||||
"unittests/textChanges.ts",
|
||||
"unittests/textStorage.ts",
|
||||
"unittests/transform.ts",
|
||||
"unittests/transpile.ts",
|
||||
"unittests/tsbuild.ts",
|
||||
"unittests/tsconfigParsing.ts",
|
||||
"unittests/tscWatchMode.ts",
|
||||
"unittests/versionCache.ts",
|
||||
"unittests/evaluation/asyncArrow.ts",
|
||||
"unittests/evaluation/asyncGenerator.ts",
|
||||
"unittests/evaluation/forAwaitOf.ts",
|
||||
"unittests/services/colorization.ts",
|
||||
"unittests/services/documentRegistry.ts",
|
||||
"unittests/services/patternMatcher.ts",
|
||||
"unittests/services/preProcessFile.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("assert", () => {
|
||||
it("deepEqual", () => {
|
||||
@@ -1,4 +1,3 @@
|
||||
/// <reference path="../harness.ts" />
|
||||
namespace ts {
|
||||
describe("base64", () => {
|
||||
describe("base64decode", () => {
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="reuseProgramStructure.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("builder", () => {
|
||||
it("emits dependent files", () => {
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("cancellableLanguageServiceOperations", () => {
|
||||
const file = `
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
/// <reference path="..\..\compiler\commandLineParser.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("parseCommandLine", () => {
|
||||
|
||||
@@ -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;
|
||||
-4
@@ -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, {
|
||||
-5
@@ -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[] }) {
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("convertToBase64", () => {
|
||||
function runTest(input: string): void {
|
||||
-5
@@ -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", () => {
|
||||
-3
@@ -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 = {}) {
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/// <reference path="extractTestHelpers.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("extractConstants", () => {
|
||||
testExtractConstant("extractConstant_TopLevel",
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/// <reference path="extractTestHelpers.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("extractFunctions", () => {
|
||||
testExtractFunction("extractFunction1",
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="extractTestHelpers.ts" />
|
||||
|
||||
namespace ts {
|
||||
function testExtractRangeFailed(caption: string, s: string, expectedErrors: string[]) {
|
||||
return it(caption, () => {
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
/// <reference path="tsserverProjectSystem.ts" />
|
||||
|
||||
namespace ts {
|
||||
interface Range {
|
||||
pos: number;
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
namespace ts {
|
||||
describe("hostNewLineSupport", () => {
|
||||
function testLSWithFiles(settings: CompilerOptions, files: Harness.Compiler.TestFile[]) {
|
||||
-3
@@ -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!)
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
/// <reference path="..\..\compiler\commandLineParser.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("initTSConfig", () => {
|
||||
function initTSConfigCorrectly(name: string, commandLinesArgs: string[]) {
|
||||
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\..\compiler\parser.ts" />
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("JSDocParsing", () => {
|
||||
describe("TypeExpressions", () => {
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("languageService", () => {
|
||||
const files: {[index: string]: string} = {
|
||||
@@ -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";
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
export function checkResolvedModule(expected: ResolvedModuleFull | undefined, actual: ResolvedModuleFull): boolean {
|
||||
if (!expected === !actual) {
|
||||
@@ -1,7 +1,3 @@
|
||||
/// <reference path="..\..\..\src\harness\harness.ts" />
|
||||
/// <reference path="..\..\..\src\harness\vfs.ts" />
|
||||
|
||||
|
||||
namespace ts {
|
||||
describe("Organize imports", () => {
|
||||
describe("Sort imports", () => {
|
||||
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\..\compiler\emitter.ts" />
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("PrinterAPI", () => {
|
||||
function makePrintsCorrectly(prefix: string) {
|
||||
-4
@@ -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);
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
namespace ts {
|
||||
describe("programNoParseFalsyFileNames", () => {
|
||||
let program: Program;
|
||||
@@ -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 {
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/// <reference path="../harness.ts" />
|
||||
/// <reference path="../../compiler/commandLineParser.ts" />
|
||||
|
||||
namespace ts {
|
||||
interface TestProjectSpecification {
|
||||
configFileName?: string;
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="../harness.ts" />
|
||||
|
||||
describe("Public APIs", () => {
|
||||
function verifyApi(fileName: string) {
|
||||
const builtFile = `built/local/${fileName}`;
|
||||
@@ -7,6 +5,7 @@ describe("Public APIs", () => {
|
||||
let fileContent: string;
|
||||
before(() => {
|
||||
fileContent = Harness.IO.readFile(builtFile)!;
|
||||
fileContent = fileContent.replace(/\r\n/g, "\n");
|
||||
});
|
||||
|
||||
it("should be acknowledged when they change", () => {
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
/// <reference path="..\..\harness\harnessLanguageService.ts" />
|
||||
|
||||
namespace ts {
|
||||
|
||||
const enum ChangedPart {
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\..\harnessLanguageService.ts" />
|
||||
|
||||
// tslint:disable no-invalid-template-strings (lots of tests use quoted code)
|
||||
|
||||
interface ClassificationEntry {
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\..\harness.ts" />
|
||||
|
||||
describe("DocumentRegistry", () => {
|
||||
it("documents are shared between projects", () => {
|
||||
const documentRegistry = ts.createDocumentRegistry();
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\..\..\services\patternMatcher.ts" />
|
||||
|
||||
describe("PatternMatcher", () => {
|
||||
describe("BreakIntoCharacterSpans", () => {
|
||||
it("EmptyIdentifier", () => {
|
||||
-2
@@ -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);
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
const expect: typeof _chai.expect = _chai.expect;
|
||||
|
||||
namespace ts.server {
|
||||
@@ -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) {
|
||||
@@ -1,6 +1,3 @@
|
||||
/// <reference path="../harness.ts" />
|
||||
/// <reference path="./tsserverProjectSystem.ts" />
|
||||
|
||||
namespace ts.projectSystem {
|
||||
describe("project telemetry", () => {
|
||||
it("does nothing for inferred project", () => {
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {
|
||||
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\..\services\transform.ts" />
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("TransformAPI", () => {
|
||||
function replaceUndefinedWithVoid0(context: TransformationContext) {
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("Transpile", () => {
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
/// <reference path="..\..\compiler\watch.ts" />
|
||||
/// <reference path="..\virtualFileSystemWithWatch.ts" />
|
||||
|
||||
namespace ts.tscWatch {
|
||||
import WatchedSystem = TestFSWithWatch.TestServerHost;
|
||||
type File = TestFSWithWatch.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("parseConfigFileTextToJson", () => {
|
||||
function assertParseResult(jsonText: string, expectedConfigObject: { config?: any; error?: Diagnostic[] }) {
|
||||
-4
@@ -1,7 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
/// <reference path="..\virtualFileSystemWithWatch.ts" />
|
||||
/// <reference path="../../server/typingsInstaller/typingsInstaller.ts" />
|
||||
|
||||
namespace ts.projectSystem {
|
||||
import TI = server.typingsInstaller;
|
||||
import protocol = server.protocol;
|
||||
-5
@@ -1,8 +1,3 @@
|
||||
/// <reference path="../harness.ts" />
|
||||
/// <reference path="./tsserverProjectSystem.ts" />
|
||||
/// <reference path="../../server/typingsInstaller/typingsInstaller.ts" />
|
||||
/// <reference path="../../services/semver.ts" />
|
||||
|
||||
namespace ts.projectSystem {
|
||||
import TI = server.typingsInstaller;
|
||||
import validatePackageName = JsTyping.validatePackageName;
|
||||
@@ -1,6 +1,3 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
/// <reference path="..\..\server\editorServices.ts" />
|
||||
|
||||
namespace ts {
|
||||
function editFlat(position: number, deletedLength: number, newText: string, source: string) {
|
||||
return source.substring(0, position) + newText + source.substring(position + deletedLength, source.length);
|
||||
@@ -200,7 +197,7 @@ and grew 1cm per day`;
|
||||
|
||||
before(() => {
|
||||
// Use scanner.ts, decent size, does not change frequently
|
||||
const testFileName = "src/compiler/scanner.ts";
|
||||
const testFileName = "src/parser/scanner.ts";
|
||||
testContent = Harness.IO.readFile(testFileName)!;
|
||||
const totalChars = testContent.length;
|
||||
assert.isTrue(totalChars > 0, "Failed to read test file.");
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user