@@ -29,7 +29,6 @@ declare namespace ts {
29
29
contains ( fileName : Path ) : boolean ;
30
30
remove ( fileName : Path ) : void ;
31
31
forEachValue ( f : ( key : Path , v : T ) => void ) : void ;
32
- getKeys ( ) : Path [ ] ;
33
32
clear ( ) : void ;
34
33
}
35
34
interface TextRange {
@@ -1246,7 +1245,7 @@ declare namespace ts {
1246
1245
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
1247
1246
* will be invoked when writing the JavaScript and declaration files.
1248
1247
*/
1249
- emit ( targetSourceFile ?: SourceFile , writeFile ?: WriteFileCallback , cancellationToken ?: CancellationToken , emitOnlyDtsFiles ?: boolean ) : EmitResult ;
1248
+ emit ( targetSourceFile ?: SourceFile , writeFile ?: WriteFileCallback , cancellationToken ?: CancellationToken ) : EmitResult ;
1250
1249
getOptionsDiagnostics ( cancellationToken ?: CancellationToken ) : Diagnostic [ ] ;
1251
1250
getGlobalDiagnostics ( cancellationToken ?: CancellationToken ) : Diagnostic [ ] ;
1252
1251
getSyntacticDiagnostics ( sourceFile ?: SourceFile , cancellationToken ?: CancellationToken ) : Diagnostic [ ] ;
@@ -1373,7 +1372,6 @@ declare namespace ts {
1373
1372
UseFullyQualifiedType = 128 ,
1374
1373
InFirstTypeArgument = 256 ,
1375
1374
InTypeAlias = 512 ,
1376
- UseTypeAliasValue = 1024 ,
1377
1375
}
1378
1376
enum SymbolFormatFlags {
1379
1377
None = 0 ,
@@ -1744,7 +1742,6 @@ declare namespace ts {
1744
1742
raw ?: any ;
1745
1743
errors : Diagnostic [ ] ;
1746
1744
wildcardDirectories ?: MapLike < WatchDirectoryFlags > ;
1747
- compileOnSave ?: boolean ;
1748
1745
}
1749
1746
enum WatchDirectoryFlags {
1750
1747
None = 0 ,
@@ -1947,6 +1944,10 @@ declare namespace ts {
1947
1944
function updateSourceFile ( sourceFile : SourceFile , newText : string , textChangeRange : TextChangeRange , aggressiveChecks ?: boolean ) : SourceFile ;
1948
1945
}
1949
1946
declare namespace ts {
1947
+ /** The version of the TypeScript compiler release */
1948
+ const version = "2.1.0" ;
1949
+ function findConfigFile ( searchPath : string , fileExists : ( fileName : string ) => boolean , configName ?: string ) : string ;
1950
+ function resolveTripleslashReference ( moduleName : string , containingFile : string ) : string ;
1950
1951
function getEffectiveTypeRoots ( options : CompilerOptions , host : {
1951
1952
directoryExists ?: ( directoryName : string ) => boolean ;
1952
1953
getCurrentDirectory ?: ( ) => string ;
@@ -1957,24 +1958,9 @@ declare namespace ts {
1957
1958
* is assumed to be the same as root directory of the project.
1958
1959
*/
1959
1960
function resolveTypeReferenceDirective ( typeReferenceDirectiveName : string , containingFile : string , options : CompilerOptions , host : ModuleResolutionHost ) : ResolvedTypeReferenceDirectiveWithFailedLookupLocations ;
1960
- /**
1961
- * Given a set of options, returns the set of type directive names
1962
- * that should be included for this program automatically.
1963
- * This list could either come from the config file,
1964
- * or from enumerating the types root + initial secondary types lookup location.
1965
- * More type directives might appear in the program later as a result of loading actual source files;
1966
- * this list is only the set of defaults that are implicitly included.
1967
- */
1968
- function getAutomaticTypeDirectiveNames ( options : CompilerOptions , host : ModuleResolutionHost ) : string [ ] ;
1969
1961
function resolveModuleName ( moduleName : string , containingFile : string , compilerOptions : CompilerOptions , host : ModuleResolutionHost ) : ResolvedModuleWithFailedLookupLocations ;
1970
1962
function nodeModuleNameResolver ( moduleName : string , containingFile : string , compilerOptions : CompilerOptions , host : ModuleResolutionHost ) : ResolvedModuleWithFailedLookupLocations ;
1971
1963
function classicNameResolver ( moduleName : string , containingFile : string , compilerOptions : CompilerOptions , host : ModuleResolutionHost ) : ResolvedModuleWithFailedLookupLocations ;
1972
- }
1973
- declare namespace ts {
1974
- /** The version of the TypeScript compiler release */
1975
- const version = "2.0.5" ;
1976
- function findConfigFile ( searchPath : string , fileExists : ( fileName : string ) => boolean , configName ?: string ) : string ;
1977
- function resolveTripleslashReference ( moduleName : string , containingFile : string ) : string ;
1978
1964
function createCompilerHost ( options : CompilerOptions , setParentNodes ?: boolean ) : CompilerHost ;
1979
1965
function getPreEmitDiagnostics ( program : Program , sourceFile ?: SourceFile , cancellationToken ?: CancellationToken ) : Diagnostic [ ] ;
1980
1966
interface FormatDiagnosticsHost {
@@ -1984,6 +1970,15 @@ declare namespace ts {
1984
1970
}
1985
1971
function formatDiagnostics ( diagnostics : Diagnostic [ ] , host : FormatDiagnosticsHost ) : string ;
1986
1972
function flattenDiagnosticMessageText ( messageText : string | DiagnosticMessageChain , newLine : string ) : string ;
1973
+ /**
1974
+ * Given a set of options, returns the set of type directive names
1975
+ * that should be included for this program automatically.
1976
+ * This list could either come from the config file,
1977
+ * or from enumerating the types root + initial secondary types lookup location.
1978
+ * More type directives might appear in the program later as a result of loading actual source files;
1979
+ * this list is only the set of defaults that are implicitly included.
1980
+ */
1981
+ function getAutomaticTypeDirectiveNames ( options : CompilerOptions , host : ModuleResolutionHost ) : string [ ] ;
1987
1982
function createProgram ( rootNames : string [ ] , options : CompilerOptions , host ?: CompilerHost , oldProgram ?: Program ) : Program ;
1988
1983
}
1989
1984
declare namespace ts {
@@ -2000,7 +1995,7 @@ declare namespace ts {
2000
1995
* @param fileName The path to the config file
2001
1996
* @param jsonText The text of the config file
2002
1997
*/
2003
- function parseConfigFileTextToJson ( fileName : string , jsonText : string , stripComments ?: boolean ) : {
1998
+ function parseConfigFileTextToJson ( fileName : string , jsonText : string ) : {
2004
1999
config ?: any ;
2005
2000
error ?: Diagnostic ;
2006
2001
} ;
@@ -2012,13 +2007,12 @@ declare namespace ts {
2012
2007
* file to. e.g. outDir
2013
2008
*/
2014
2009
function parseJsonConfigFileContent ( json : any , host : ParseConfigHost , basePath : string , existingOptions ?: CompilerOptions , configFileName ?: string , resolutionStack ?: Path [ ] ) : ParsedCommandLine ;
2015
- function convertCompileOnSaveOptionFromJson ( jsonOption : any , basePath : string , errors : Diagnostic [ ] ) : boolean ;
2016
2010
function convertCompilerOptionsFromJson ( jsonOptions : any , basePath : string , configFileName ?: string ) : {
2017
2011
options : CompilerOptions ;
2018
2012
errors : Diagnostic [ ] ;
2019
2013
} ;
2020
2014
function convertTypingOptionsFromJson ( jsonOptions : any , basePath : string , configFileName ?: string ) : {
2021
- options : TypingOptions ;
2015
+ options : CompilerOptions ;
2022
2016
errors : Diagnostic [ ] ;
2023
2017
} ;
2024
2018
}
@@ -2161,18 +2155,18 @@ declare namespace ts {
2161
2155
getDocumentHighlights ( fileName : string , position : number , filesToSearch : string [ ] ) : DocumentHighlights [ ] ;
2162
2156
/** @deprecated */
2163
2157
getOccurrencesAtPosition ( fileName : string , position : number ) : ReferenceEntry [ ] ;
2164
- getNavigateToItems ( searchValue : string , maxResultCount ?: number , fileName ?: string , excludeDtsFiles ?: boolean ) : NavigateToItem [ ] ;
2158
+ getNavigateToItems ( searchValue : string , maxResultCount ?: number , fileName ?: string ) : NavigateToItem [ ] ;
2165
2159
getNavigationBarItems ( fileName : string ) : NavigationBarItem [ ] ;
2166
2160
getOutliningSpans ( fileName : string ) : OutliningSpan [ ] ;
2167
2161
getTodoComments ( fileName : string , descriptors : TodoCommentDescriptor [ ] ) : TodoComment [ ] ;
2168
2162
getBraceMatchingAtPosition ( fileName : string , position : number ) : TextSpan [ ] ;
2169
- getIndentationAtPosition ( fileName : string , position : number , options : EditorOptions | EditorSettings ) : number ;
2170
- getFormattingEditsForRange ( fileName : string , start : number , end : number , options : FormatCodeOptions | FormatCodeSettings ) : TextChange [ ] ;
2171
- getFormattingEditsForDocument ( fileName : string , options : FormatCodeOptions | FormatCodeSettings ) : TextChange [ ] ;
2172
- getFormattingEditsAfterKeystroke ( fileName : string , position : number , key : string , options : FormatCodeOptions | FormatCodeSettings ) : TextChange [ ] ;
2163
+ getIndentationAtPosition ( fileName : string , position : number , options : EditorOptions ) : number ;
2164
+ getFormattingEditsForRange ( fileName : string , start : number , end : number , options : FormatCodeOptions ) : TextChange [ ] ;
2165
+ getFormattingEditsForDocument ( fileName : string , options : FormatCodeOptions ) : TextChange [ ] ;
2166
+ getFormattingEditsAfterKeystroke ( fileName : string , position : number , key : string , options : FormatCodeOptions ) : TextChange [ ] ;
2173
2167
getDocCommentTemplateAtPosition ( fileName : string , position : number ) : TextInsertion ;
2174
2168
isValidBraceCompletionAtPosition ( fileName : string , position : number , openingBrace : number ) : boolean ;
2175
- getEmitOutput ( fileName : string , emitOnlyDtsFiles ?: boolean ) : EmitOutput ;
2169
+ getEmitOutput ( fileName : string ) : EmitOutput ;
2176
2170
getProgram ( ) : Program ;
2177
2171
dispose ( ) : void ;
2178
2172
}
@@ -2252,11 +2246,6 @@ declare namespace ts {
2252
2246
containerName : string ;
2253
2247
containerKind : string ;
2254
2248
}
2255
- enum IndentStyle {
2256
- None = 0 ,
2257
- Block = 1 ,
2258
- Smart = 2 ,
2259
- }
2260
2249
interface EditorOptions {
2261
2250
BaseIndentSize ?: number ;
2262
2251
IndentSize : number ;
@@ -2265,13 +2254,10 @@ declare namespace ts {
2265
2254
ConvertTabsToSpaces : boolean ;
2266
2255
IndentStyle : IndentStyle ;
2267
2256
}
2268
- interface EditorSettings {
2269
- baseIndentSize ?: number ;
2270
- indentSize : number ;
2271
- tabSize : number ;
2272
- newLineCharacter : string ;
2273
- convertTabsToSpaces : boolean ;
2274
- indentStyle : IndentStyle ;
2257
+ enum IndentStyle {
2258
+ None = 0 ,
2259
+ Block = 1 ,
2260
+ Smart = 2 ,
2275
2261
}
2276
2262
interface FormatCodeOptions extends EditorOptions {
2277
2263
InsertSpaceAfterCommaDelimiter : boolean ;
@@ -2287,21 +2273,7 @@ declare namespace ts {
2287
2273
InsertSpaceAfterTypeAssertion ?: boolean ;
2288
2274
PlaceOpenBraceOnNewLineForFunctions : boolean ;
2289
2275
PlaceOpenBraceOnNewLineForControlBlocks : boolean ;
2290
- }
2291
- interface FormatCodeSettings extends EditorSettings {
2292
- insertSpaceAfterCommaDelimiter : boolean ;
2293
- insertSpaceAfterSemicolonInForStatements : boolean ;
2294
- insertSpaceBeforeAndAfterBinaryOperators : boolean ;
2295
- insertSpaceAfterKeywordsInControlFlowStatements : boolean ;
2296
- insertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean ;
2297
- insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean ;
2298
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets : boolean ;
2299
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces ?: boolean ;
2300
- insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces : boolean ;
2301
- insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces : boolean ;
2302
- insertSpaceAfterTypeAssertion ?: boolean ;
2303
- placeOpenBraceOnNewLineForFunctions : boolean ;
2304
- placeOpenBraceOnNewLineForControlBlocks : boolean ;
2276
+ [ s : string ] : boolean | number | string | undefined ;
2305
2277
}
2306
2278
interface DefinitionInfo {
2307
2279
fileName : string ;
@@ -2715,7 +2687,6 @@ declare namespace ts {
2715
2687
interface DisplayPartsSymbolWriter extends SymbolWriter {
2716
2688
displayParts ( ) : SymbolDisplayPart [ ] ;
2717
2689
}
2718
- function toEditorSettings ( options : EditorOptions | EditorSettings ) : EditorSettings ;
2719
2690
function displayPartsToString ( displayParts : SymbolDisplayPart [ ] ) : string ;
2720
2691
function getDefaultCompilerOptions ( ) : CompilerOptions ;
2721
2692
function createLanguageServiceSourceFile ( fileName : string , scriptSnapshot : IScriptSnapshot , scriptTarget : ScriptTarget , version : string , setNodeParents : boolean , scriptKind ?: ScriptKind ) : SourceFile ;
0 commit comments