Skip to content

Commit

Permalink
2016-08-14 [ci skip] Version: 1.201608140006.1+10d1e02916578e4ece7bd2…
Browse files Browse the repository at this point in the history
…4352f144be1eb72305
  • Loading branch information
basarat committed Aug 14, 2016
1 parent ec583f2 commit 66ce81b
Show file tree
Hide file tree
Showing 25 changed files with 793 additions and 840 deletions.
48 changes: 25 additions & 23 deletions bin/ntypescript.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
declare namespace ts {
interface Map<T> {
interface MapLike<T> {
[index: string]: T;
}
interface Map<T> extends MapLike<T> {
__mapBrand: any;
}
type Path = string & {
__pathBrand: any;
};
Expand Down Expand Up @@ -1137,7 +1140,7 @@ declare namespace ts {
typeReferenceDirectives: FileReference[];
languageVariant: LanguageVariant;
isDeclarationFile: boolean;
renamedDependencies?: Map<string>;
renamedDependencies?: MapLike<string>;
/**
* lib.d.ts should have a reference comment like
*
Expand Down Expand Up @@ -1543,9 +1546,7 @@ declare namespace ts {
}
interface TransientSymbol extends Symbol, SymbolLinks {
}
interface SymbolTable {
[index: string]: Symbol;
}
type SymbolTable = Map<Symbol>;
/** Represents a "prefix*suffix" pattern. */
interface Pattern {
prefix: string;
Expand Down Expand Up @@ -1815,7 +1816,7 @@ declare namespace ts {
NodeJs = 2,
}
type RootPaths = string[];
type PathSubstitutions = Map<string[]>;
type PathSubstitutions = MapLike<string[]>;
type TsConfigOnlyOptions = RootPaths | PathSubstitutions;
type CompilerOptionsValue = string | number | boolean | (string | number)[] | TsConfigOnlyOptions;
interface CompilerOptions {
Expand Down Expand Up @@ -1957,19 +1958,19 @@ declare namespace ts {
fileNames: string[];
raw?: any;
errors: Diagnostic[];
wildcardDirectories?: Map<WatchDirectoryFlags>;
wildcardDirectories?: MapLike<WatchDirectoryFlags>;
}
enum WatchDirectoryFlags {
None = 0,
Recursive = 1,
}
interface ExpandResult {
fileNames: string[];
wildcardDirectories: Map<WatchDirectoryFlags>;
wildcardDirectories: MapLike<WatchDirectoryFlags>;
}
interface CommandLineOptionBase {
name: string;
type: "string" | "number" | "boolean" | "object" | "list" | Map<number | string>;
type: "string" | "number" | "boolean" | "object" | "list" | MapLike<number | string>;
isFilePath?: boolean;
shortName?: string;
description?: DiagnosticMessage;
Expand All @@ -1981,7 +1982,7 @@ declare namespace ts {
type: "string" | "number" | "boolean";
}
interface CommandLineOptionOfCustomType extends CommandLineOptionBase {
type: Map<number | string>;
type: MapLike<number | string>;
}
interface TsConfigOnlyOption extends CommandLineOptionBase {
type: "object";
Expand Down Expand Up @@ -2246,6 +2247,7 @@ declare namespace ts {
Maybe = 1,
True = -1,
}
function createMap<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 Down Expand Up @@ -2293,17 +2295,17 @@ 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;
function hasProperty<T>(map: Map<T>, key: string): boolean;
function getKeys<T>(map: Map<T>): string[];
function getProperty<T>(map: Map<T>, key: string): T | undefined;
function getOrUpdateProperty<T>(map: Map<T>, key: string, makeValue: () => T): T;
function isEmpty<T>(map: Map<T>): boolean;
function hasProperty<T>(map: MapLike<T>, key: string): boolean;
function getKeys<T>(map: MapLike<T>): string[];
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 Map<{}>, T2 extends Map<{}>>(first: T1, second: T2): T1 & T2;
function forEachValue<T, U>(map: Map<T>, callback: (value: T) => U): U;
function forEachKey<T, U>(map: Map<T>, callback: (key: string) => U): U;
function lookUp<T>(map: Map<T>, key: string): T;
function copyMap<T>(source: Map<T>, target: Map<T>): void;
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.
*
Expand All @@ -2322,7 +2324,7 @@ declare namespace ts {
* @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: Map<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U;
function reduceProperties<T, U>(map: MapLike<T>, callback: (aggregate: U, value: T, key: string) => U, initial: U): U;
/**
* Tests whether a value is an array.
*/
Expand Down Expand Up @@ -2511,7 +2513,7 @@ declare namespace ts {
function getSingleLineStringWriter(): StringSymbolWriter;
function releaseStringWriter(writer: StringSymbolWriter): void;
function getFullWidth(node: Node): number;
function mapIsEqualTo<T>(map1: Map<T>, map2: Map<T>): boolean;
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 @@ -8791,7 +8793,7 @@ declare namespace ts {
fileName?: string;
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: Map<string>;
renamedDependencies?: MapLike<string>;
}
interface TranspileOutput {
outputText: string;
Expand Down
Loading

0 comments on commit 66ce81b

Please sign in to comment.