@@ -13,7 +13,7 @@ See the Apache Version 2.0 License for specific language governing permissions
13
13
and limitations under the License.
14
14
***************************************************************************** */
15
15
16
- declare module "typescript" {
16
+ declare namespace ts {
17
17
interface Map < T > {
18
18
[ index : string ] : T ;
19
19
}
@@ -1405,7 +1405,7 @@ declare module "typescript" {
1405
1405
newLength : number ;
1406
1406
}
1407
1407
}
1408
- declare module "typescript" {
1408
+ declare namespace ts {
1409
1409
interface System {
1410
1410
args : string [ ] ;
1411
1411
newLine : string ;
@@ -1429,7 +1429,7 @@ declare module "typescript" {
1429
1429
}
1430
1430
var sys : System ;
1431
1431
}
1432
- declare module "typescript" {
1432
+ declare namespace ts {
1433
1433
interface ErrorCallback {
1434
1434
( message : DiagnosticMessage , length : number ) : void ;
1435
1435
}
@@ -1474,7 +1474,7 @@ declare module "typescript" {
1474
1474
function isIdentifierPart ( ch : number , languageVersion : ScriptTarget ) : boolean ;
1475
1475
function createScanner ( languageVersion : ScriptTarget , skipTrivia : boolean , languageVariant ?: LanguageVariant , text ?: string , onError ?: ErrorCallback , start ?: number , length ?: number ) : Scanner ;
1476
1476
}
1477
- declare module "typescript" {
1477
+ declare namespace ts {
1478
1478
function getDefaultLibFileName ( options : CompilerOptions ) : string ;
1479
1479
function textSpanEnd ( span : TextSpan ) : number ;
1480
1480
function textSpanIsEmpty ( span : TextSpan ) : boolean ;
@@ -1504,14 +1504,14 @@ declare module "typescript" {
1504
1504
function collapseTextChangeRangesAcrossMultipleVersions ( changes : TextChangeRange [ ] ) : TextChangeRange ;
1505
1505
function getTypeParameterOwner ( d : Declaration ) : Declaration ;
1506
1506
}
1507
- declare module "typescript" {
1507
+ declare namespace ts {
1508
1508
function getNodeConstructor ( kind : SyntaxKind ) : new ( ) => Node ;
1509
1509
function createNode ( kind : SyntaxKind ) : Node ;
1510
1510
function forEachChild < T > ( node : Node , cbNode : ( node : Node ) => T , cbNodeArray ?: ( nodes : Node [ ] ) => T ) : T ;
1511
1511
function createSourceFile ( fileName : string , sourceText : string , languageVersion : ScriptTarget , setParentNodes ?: boolean ) : SourceFile ;
1512
1512
function updateSourceFile ( sourceFile : SourceFile , newText : string , textChangeRange : TextChangeRange , aggressiveChecks ?: boolean ) : SourceFile ;
1513
1513
}
1514
- declare module "typescript" {
1514
+ declare namespace ts {
1515
1515
const version : string ;
1516
1516
function findConfigFile ( searchPath : string ) : string ;
1517
1517
function resolveTripleslashReference ( moduleName : string , containingFile : string ) : string ;
@@ -1524,7 +1524,7 @@ declare module "typescript" {
1524
1524
function flattenDiagnosticMessageText ( messageText : string | DiagnosticMessageChain , newLine : string ) : string ;
1525
1525
function createProgram ( rootNames : string [ ] , options : CompilerOptions , host ?: CompilerHost , oldProgram ?: Program ) : Program ;
1526
1526
}
1527
- declare module "typescript" {
1527
+ declare namespace ts {
1528
1528
function parseCommandLine ( commandLine : string [ ] , readFile ?: ( path : string ) => string ) : ParsedCommandLine ;
1529
1529
/**
1530
1530
* Read tsconfig.json file
@@ -1551,7 +1551,7 @@ declare module "typescript" {
1551
1551
*/
1552
1552
function parseConfigFile ( json : any , host : ParseConfigHost , basePath : string ) : ParsedCommandLine ;
1553
1553
}
1554
- declare module "typescript" {
1554
+ declare namespace ts {
1555
1555
/** The version of the language service API */
1556
1556
let servicesVersion : string ;
1557
1557
interface Node {
@@ -2139,3 +2139,5 @@ declare module "typescript" {
2139
2139
*/
2140
2140
function getDefaultLibFilePath ( options : CompilerOptions ) : string ;
2141
2141
}
2142
+
2143
+ export = ts ;
0 commit comments