mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 11:50:54 -06:00
Jakefile rewrite WIP
This commit is contained in:
parent
8033f2e1e1
commit
5804905ca6
1331
Jakefile.js
1331
Jakefile.js
File diff suppressed because it is too large
Load Diff
@ -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 {
|
||||
|
||||
@ -33,10 +33,10 @@ namespace ts {
|
||||
resolvedFileName: string | undefined;
|
||||
}
|
||||
|
||||
interface CachedResolvedModuleWithFailedLookupLocations 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 {
|
||||
@ -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,
|
||||
@ -137,7 +137,7 @@ namespace ts {
|
||||
return resolution.resolvedModule;
|
||||
}
|
||||
|
||||
function getResolvedTypeReferenceDirective(resolution: ResolvedTypeReferenceDirectiveWithFailedLookupLocations) {
|
||||
function getResolvedTypeReferenceDirective(resolution: CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations) {
|
||||
return resolution.resolvedTypeReferenceDirective;
|
||||
}
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -62,7 +62,7 @@ namespace ts {
|
||||
export interface Push<T> {
|
||||
push(...values: T[]): void;
|
||||
}
|
||||
|
||||
|
||||
/** Create a MapLike with good performance. */
|
||||
function createDictionaryObject<T>(): MapLike<T> {
|
||||
const map = Object.create(/*prototype*/ null); // tslint:disable-line:no-null-keyword
|
||||
|
||||
@ -9,8 +9,7 @@ namespace FourSlash {
|
||||
ShimsWithPreprocess,
|
||||
Server
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Represents a parsed source file with metadata
|
||||
interface FourSlashFile {
|
||||
// The contents of the file (with markers, etc stripped out)
|
||||
|
||||
@ -7,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) => {
|
||||
|
||||
@ -6818,7 +6818,7 @@ namespace ts {
|
||||
|
||||
lastChain.next = tailChain;
|
||||
return headChain;
|
||||
}
|
||||
}
|
||||
|
||||
function getDiagnosticFilePath(diagnostic: Diagnostic): string | undefined {
|
||||
return diagnostic.file ? diagnostic.file.path : undefined;
|
||||
@ -6924,12 +6924,6 @@ namespace ts {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Paths
|
||||
//
|
||||
|
||||
/**
|
||||
* Internally, we represent paths as strings with '/' as the directory separator.
|
||||
* When we make system calls (eg: LanguageServiceHost.getDirectory()),
|
||||
@ -6938,7 +6932,6 @@ namespace ts {
|
||||
export const directorySeparator = "/";
|
||||
const altDirectorySeparator = "\\";
|
||||
const urlSchemeSeparator = "://";
|
||||
|
||||
const backslashRegExp = /\\/g;
|
||||
|
||||
/**
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"removeComments": true,
|
||||
"outFile": "../../built/local/tsserverlibrary.js",
|
||||
"outFile": "../../built/local/server.js",
|
||||
"preserveConstEnums": true,
|
||||
"types": [
|
||||
"node"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user