Skip to content

Commit

Permalink
2016-08-18 [ci skip] Version: 1.201608180006.1+da8fc5d5a90dc18e83a137…
Browse files Browse the repository at this point in the history
…ba7e04d38854fc1c7d
  • Loading branch information
basarat committed Aug 18, 2016
1 parent d39aa10 commit 6b2ab5b
Show file tree
Hide file tree
Showing 29 changed files with 1,776 additions and 1,276 deletions.
2 changes: 1 addition & 1 deletion TypeScript
Submodule TypeScript updated 76 files
+59 −57 Gulpfile.ts
+10 −9 Jakefile.js
+1 −1 README.md
+1 −0 package.json
+1 −1 scripts/types/ambient.d.ts
+47 −42 src/compiler/binder.ts
+32 −32 src/compiler/checker.ts
+125 −28 src/compiler/commandLineParser.ts
+158 −72 src/compiler/core.ts
+4 −6 src/compiler/declarationEmitter.ts
+18 −18 src/compiler/emitter.ts
+13 −1 src/compiler/parser.ts
+16 −27 src/compiler/program.ts
+4 −6 src/compiler/scanner.ts
+9 −66 src/compiler/tsc.ts
+11 −5 src/compiler/types.ts
+3 −22 src/compiler/utilities.ts
+3 −3 src/harness/compilerRunner.ts
+15 −14 src/harness/fourslash.ts
+14 −15 src/harness/harness.ts
+5 −5 src/harness/harnessLanguageService.ts
+3 −6 src/harness/projectsRunner.ts
+2 −1 src/harness/tsconfig.json
+10 −10 src/harness/unittests/cachingInServerLSHost.ts
+44 −0 src/harness/unittests/initializeTSConfig.ts
+37 −41 src/harness/unittests/moduleResolution.ts
+37 −51 src/harness/unittests/reuseProgramStructure.ts
+4 −4 src/harness/unittests/session.ts
+11 −21 src/harness/unittests/tsserverProjectSystem.ts
+6 −1 src/lib/es5.d.ts
+1 −1 src/server/client.ts
+10 −10 src/server/editorServices.ts
+4 −3 src/server/session.ts
+8 −13 src/services/jsTyping.ts
+1 −1 src/services/navigateTo.ts
+1 −1 src/services/navigationBar.ts
+1 −1 src/services/patternMatcher.ts
+19 −18 src/services/services.ts
+4 −4 src/services/shims.ts
+1 −1 src/services/signatureHelp.ts
+0 −8 tests/baselines/reference/ambientShorthand_isImplicitAny.errors.txt
+0 −5 tests/baselines/reference/ambientShorthand_isImplicitAny.js
+46 −0 tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt
+54 −0 tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js
+24 −0 tests/baselines/reference/jsdocLiteral.js
+24 −0 tests/baselines/reference/jsdocLiteral.symbols
+30 −0 tests/baselines/reference/jsdocLiteral.types
+59 −2 tests/baselines/reference/multipleDeclarations.js
+92 −5 tests/baselines/reference/multipleDeclarations.symbols
+112 −2 tests/baselines/reference/multipleDeclarations.types
+63 −0 tests/baselines/reference/nestedLoopTypeGuards.js
+66 −0 tests/baselines/reference/nestedLoopTypeGuards.symbols
+96 −0 tests/baselines/reference/nestedLoopTypeGuards.types
+22 −0 tests/baselines/reference/noErrorTruncation.errors.txt
+21 −0 tests/baselines/reference/noErrorTruncation.js
+8 −0 tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json
+9 −0 tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json
+9 −0 tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json
+13 −0 tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json
+12 −0 tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json
+8 −0 tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json
+12 −0 .../baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json
+12 −0 tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json
+13 −0 tests/baselines/reference/typingsLookup3.js
+12 −0 tests/baselines/reference/typingsLookup3.symbols
+12 −0 tests/baselines/reference/typingsLookup3.trace.json
+12 −0 tests/baselines/reference/typingsLookup3.types
+18 −0 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts
+31 −0 tests/cases/compiler/nestedLoopTypeGuards.ts
+15 −0 tests/cases/compiler/noErrorTruncation.ts
+0 −2 tests/cases/conformance/ambient/ambientShorthand_isImplicitAny.ts
+13 −0 tests/cases/conformance/jsdoc/jsdocLiteral.ts
+29 −2 tests/cases/conformance/salsa/multipleDeclarations.ts
+14 −0 tests/cases/conformance/typings/typingsLookup3.ts
+23 −0 tests/cases/fourslash/completionForStringLiteral4.ts
+1 −2 tslint.json
7 changes: 6 additions & 1 deletion bin/lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,12 @@ interface ReadonlyArray<T> {
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: T[]): T[];
concat(...items: T[][]): T[];
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: (T | T[])[]): T[];
/**
* Adds all the elements of an array separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
Expand Down
7 changes: 6 additions & 1 deletion bin/lib.es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,12 @@ interface ReadonlyArray<T> {
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: T[]): T[];
concat(...items: T[][]): T[];
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: (T | T[])[]): T[];
/**
* Adds all the elements of an array separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
Expand Down
7 changes: 6 additions & 1 deletion bin/lib.es6.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,12 @@ interface ReadonlyArray<T> {
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: T[]): T[];
concat(...items: T[][]): T[];
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: (T | T[])[]): T[];
/**
* Adds all the elements of an array separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
Expand Down
131 changes: 104 additions & 27 deletions bin/ntypescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@ declare namespace ts {
JSDocTypedefTag = 279,
JSDocPropertyTag = 280,
JSDocTypeLiteral = 281,
SyntaxList = 282,
Count = 283,
JSDocLiteralType = 282,
SyntaxList = 283,
Count = 284,
FirstAssignment = 56,
LastAssignment = 68,
FirstReservedWord = 70,
Expand All @@ -329,9 +330,9 @@ declare namespace ts {
LastBinaryOperator = 68,
FirstNode = 139,
FirstJSDocNode = 257,
LastJSDocNode = 281,
LastJSDocNode = 282,
FirstJSDocTagNode = 273,
LastJSDocTagNode = 281,
LastJSDocTagNode = 282,
}
enum NodeFlags {
None = 0,
Expand Down Expand Up @@ -1041,6 +1042,9 @@ declare namespace ts {
interface JSDocThisType extends JSDocType {
type: JSDocType;
}
interface JSDocLiteralType extends JSDocType {
literal: LiteralTypeNode;
}
type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
interface JSDocRecordMember extends PropertySignature {
name: Identifier | LiteralExpression;
Expand Down Expand Up @@ -1140,7 +1144,7 @@ declare namespace ts {
typeReferenceDirectives: FileReference[];
languageVariant: LanguageVariant;
isDeclarationFile: boolean;
renamedDependencies?: MapLike<string>;
renamedDependencies?: Map<string>;
/**
* lib.d.ts should have a reference comment like
*
Expand Down Expand Up @@ -1525,6 +1529,7 @@ declare namespace ts {
exportSymbol?: Symbol;
constEnumOnlyModule?: boolean;
isReferenced?: boolean;
isReplaceableByMethod?: boolean;
isAssigned?: boolean;
}
interface SymbolLinks {
Expand Down Expand Up @@ -1972,7 +1977,7 @@ declare namespace ts {
}
interface CommandLineOptionBase {
name: string;
type: "string" | "number" | "boolean" | "object" | "list" | MapLike<number | string>;
type: "string" | "number" | "boolean" | "object" | "list" | Map<number | string>;
isFilePath?: boolean;
shortName?: string;
description?: DiagnosticMessage;
Expand All @@ -1984,7 +1989,7 @@ declare namespace ts {
type: "string" | "number" | "boolean";
}
interface CommandLineOptionOfCustomType extends CommandLineOptionBase {
type: MapLike<number | string>;
type: Map<number | string>;
}
interface TsConfigOnlyOption extends CommandLineOptionBase {
type: "object";
Expand Down Expand Up @@ -2242,7 +2247,7 @@ declare namespace ts {
Maybe = 1,
True = -1,
}
function createMap<T>(): Map<T>;
function createMap<T>(template?: MapLike<T>): Map<T>;
function createFileMap<T>(keyMapper?: (key: string) => string): FileMap<T>;
function toPath(fileName: string, basePath: string, getCanonicalFileName: (path: string) => string): Path;
enum Comparison {
Expand All @@ -2267,6 +2272,7 @@ declare namespace ts {
* true for all elements, otherwise returns a new array instance containing the filtered subset.
*/
function filter<T>(array: T[], f: (x: T) => boolean): T[];
function removeWhere<T>(array: T[], f: (x: T) => boolean): boolean;
function filterMutate<T>(array: T[], f: (x: T) => boolean): void;
function map<T, U>(array: T[], f: (x: T) => U): U[];
function concatenate<T>(array1: T[], array2: T[]): T[];
Expand All @@ -2290,36 +2296,100 @@ declare namespace ts {
function reduceLeft<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
function reduceRight<T>(array: T[], f: (a: T, x: T) => T): T;
function reduceRight<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
/**
* Indicates whether a map-like contains an own property with the specified key.
*
* NOTE: This is intended for use only with MapLike<T> objects. For Map<T> objects, use
* the 'in' operator.
*
* @param map A map-like.
* @param key A property key.
*/
function hasProperty<T>(map: MapLike<T>, key: string): boolean;
function getKeys<T>(map: MapLike<T>): string[];
/**
* Gets the value of an owned property in a map-like.
*
* NOTE: This is intended for use only with MapLike<T> objects. For Map<T> objects, use
* an indexer.
*
* @param map A map-like.
* @param key A property key.
*/
function getProperty<T>(map: MapLike<T>, key: string): T | undefined;
function getOrUpdateProperty<T>(map: MapLike<T>, key: string, makeValue: () => T): T;
function isEmpty<T>(map: MapLike<T>): boolean;
function clone<T>(object: T): T;
function extend<T1 extends MapLike<{}>, T2 extends MapLike<{}>>(first: T1, second: T2): T1 & T2;
function forEachValue<T, U>(map: MapLike<T>, callback: (value: T) => U): U;
function forEachKey<T, U>(map: MapLike<T>, callback: (key: string) => U): U;
function lookUp<T>(map: MapLike<T>, key: string): T;
function copyMap<T>(source: MapLike<T>, target: MapLike<T>): void;
/**
* Creates a map from the elements of an array.
* Gets the owned, enumerable property keys of a map-like.
*
* @param array the array of input elements.
* @param makeKey a function that produces a key for a given element.
* NOTE: This is intended for use with MapLike<T> objects. For Map<T> objects, use
* Object.keys instead as it offers better performance.
*
* This function makes no effort to avoid collisions; if any two elements produce
* the same key with the given 'makeKey' function, then the element with the higher
* index in the array will be the one associated with the produced key.
* @param map A map-like.
*/
function arrayToMap<T>(array: T[], makeKey: (value: T) => string): Map<T>;
function getOwnKeys<T>(map: MapLike<T>): string[];
/**
* Enumerates the properties of a Map<T>, invoking a callback and returning the first truthy result.
*
* @param map A map for which properties should be enumerated.
* @param callback A callback to invoke for each property.
*/
function forEachProperty<T, U>(map: Map<T>, callback: (value: T, key: string) => U): U;
/**
* Returns true if a Map<T> has some matching property.
*
* @param map A map whose properties should be tested.
* @param predicate An optional callback used to test each property.
*/
function someProperties<T>(map: Map<T>, predicate?: (value: T, key: string) => boolean): boolean;
/**
* Performs a shallow copy of the properties from a source Map<T> to a target MapLike<T>
*
* @param source A map from which properties should be copied.
* @param target A map to which properties should be copied.
*/
function copyProperties<T>(source: Map<T>, target: MapLike<T>): void;
/**
* Reduce the properties of a map.
*
* NOTE: This is intended for use with Map<T> objects. For MapLike<T> objects, use
* reduceOwnProperties instead as it offers better runtime safety.
*
* @param map The map to reduce
* @param callback An aggregation function that is called for each entry in the map
* @param initial The initial value for the reduction.
*/
function reduceProperties<T, U>(map: MapLike<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U;
function reduceProperties<T, U>(map: Map<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U;
/**
* Reduce the properties defined on a map-like (but not from its prototype chain).
*
* NOTE: This is intended for use with MapLike<T> objects. For Map<T> objects, use
* reduceProperties instead as it offers better performance.
*
* @param map The map-like to reduce
* @param callback An aggregation function that is called for each entry in the map
* @param initial The initial value for the reduction.
*/
function reduceOwnProperties<T, U>(map: MapLike<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U;
/**
* Performs a shallow equality comparison of the contents of two map-likes.
*
* @param left A map-like whose properties should be compared.
* @param right A map-like whose properties should be compared.
*/
function equalOwnProperties<T>(left: MapLike<T>, right: MapLike<T>, equalityComparer?: (left: T, right: T) => boolean): boolean;
/**
* Creates a map from the elements of an array.
*
* @param array the array of input elements.
* @param makeKey a function that produces a key for a given element.
*
* This function makes no effort to avoid collisions; if any two elements produce
* the same key with the given 'makeKey' function, then the element with the higher
* index in the array will be the one associated with the produced key.
*/
function arrayToMap<T>(array: T[], makeKey: (value: T) => string): Map<T>;
function arrayToMap<T, U>(array: T[], makeKey: (value: T) => string, makeValue: (value: T) => U): Map<U>;
function cloneMap<T>(map: Map<T>): Map<T>;
function clone<T>(object: T): T;
function extend<T1, T2>(first: T1, second: T2): T1 & T2;
/**
* Tests whether a value is an array.
*/
Expand Down Expand Up @@ -2508,7 +2578,6 @@ declare namespace ts {
function getSingleLineStringWriter(): StringSymbolWriter;
function releaseStringWriter(writer: StringSymbolWriter): void;
function getFullWidth(node: Node): number;
function mapIsEqualTo<T>(map1: MapLike<T>, map2: MapLike<T>): boolean;
function arrayIsEqualTo<T>(array1: T[], array2: T[], equaler?: (a: T, b: T) => boolean): boolean;
function hasResolvedModule(sourceFile: SourceFile, moduleNameText: string): boolean;
function getResolvedModule(sourceFile: SourceFile, moduleNameText: string): ResolvedModule;
Expand Down Expand Up @@ -7482,6 +7551,7 @@ declare namespace ts {
optionNameMap: Map<CommandLineOption>;
shortOptionNames: Map<string>;
}
const defaultInitCompilerOptions: CompilerOptions;
function getOptionNameMap(): OptionNameMap;
function createCompilerDiagnosticForInvalidCustomType(opt: CommandLineOptionOfCustomType): Diagnostic;
function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]): number | string;
Expand All @@ -7504,6 +7574,14 @@ declare namespace ts {
config?: any;
error?: Diagnostic;
};
/**
* Generate tsconfig configuration when running command line "--init"
* @param options commandlineOptions to be generated into tsconfig.json
* @param fileNames array of filenames to be generated into tsconfig.json
*/
function generateTSConfig(options: CompilerOptions, fileNames: string[]): {
compilerOptions: Map<CompilerOptionsValue>;
};
/**
* Parse the contents of a config file (tsconfig.json).
* @param json The contents of the config file to parse
Expand Down Expand Up @@ -7568,7 +7646,6 @@ declare namespace ts {
directoryExists?: (directoryName: string) => boolean;
}): boolean;
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
const defaultInitCompilerOptions: CompilerOptions;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
interface FormatDiagnosticsHost {
Expand Down
Loading

0 comments on commit 6b2ab5b

Please sign in to comment.