@@ -13,7 +13,7 @@ See the Apache Version 2.0 License for specific language governing permissions
1313and limitations under the License.
1414***************************************************************************** */
1515
16- declare module "typescript" {
16+ declare namespace ts {
1717 interface Map < T > {
1818 [ index : string ] : T ;
1919 }
@@ -1405,7 +1405,7 @@ declare module "typescript" {
14051405 newLength : number ;
14061406 }
14071407}
1408- declare module "typescript" {
1408+ declare namespace ts {
14091409 interface System {
14101410 args : string [ ] ;
14111411 newLine : string ;
@@ -1429,7 +1429,7 @@ declare module "typescript" {
14291429 }
14301430 var sys : System ;
14311431}
1432- declare module "typescript" {
1432+ declare namespace ts {
14331433 interface ErrorCallback {
14341434 ( message : DiagnosticMessage , length : number ) : void ;
14351435 }
@@ -1474,7 +1474,7 @@ declare module "typescript" {
14741474 function isIdentifierPart ( ch : number , languageVersion : ScriptTarget ) : boolean ;
14751475 function createScanner ( languageVersion : ScriptTarget , skipTrivia : boolean , languageVariant ?: LanguageVariant , text ?: string , onError ?: ErrorCallback , start ?: number , length ?: number ) : Scanner ;
14761476}
1477- declare module "typescript" {
1477+ declare namespace ts {
14781478 function getDefaultLibFileName ( options : CompilerOptions ) : string ;
14791479 function textSpanEnd ( span : TextSpan ) : number ;
14801480 function textSpanIsEmpty ( span : TextSpan ) : boolean ;
@@ -1504,14 +1504,14 @@ declare module "typescript" {
15041504 function collapseTextChangeRangesAcrossMultipleVersions ( changes : TextChangeRange [ ] ) : TextChangeRange ;
15051505 function getTypeParameterOwner ( d : Declaration ) : Declaration ;
15061506}
1507- declare module "typescript" {
1507+ declare namespace ts {
15081508 function getNodeConstructor ( kind : SyntaxKind ) : new ( ) => Node ;
15091509 function createNode ( kind : SyntaxKind ) : Node ;
15101510 function forEachChild < T > ( node : Node , cbNode : ( node : Node ) => T , cbNodeArray ?: ( nodes : Node [ ] ) => T ) : T ;
15111511 function createSourceFile ( fileName : string , sourceText : string , languageVersion : ScriptTarget , setParentNodes ?: boolean ) : SourceFile ;
15121512 function updateSourceFile ( sourceFile : SourceFile , newText : string , textChangeRange : TextChangeRange , aggressiveChecks ?: boolean ) : SourceFile ;
15131513}
1514- declare module "typescript" {
1514+ declare namespace ts {
15151515 const version : string ;
15161516 function findConfigFile ( searchPath : string ) : string ;
15171517 function resolveTripleslashReference ( moduleName : string , containingFile : string ) : string ;
@@ -1524,7 +1524,7 @@ declare module "typescript" {
15241524 function flattenDiagnosticMessageText ( messageText : string | DiagnosticMessageChain , newLine : string ) : string ;
15251525 function createProgram ( rootNames : string [ ] , options : CompilerOptions , host ?: CompilerHost , oldProgram ?: Program ) : Program ;
15261526}
1527- declare module "typescript" {
1527+ declare namespace ts {
15281528 function parseCommandLine ( commandLine : string [ ] , readFile ?: ( path : string ) => string ) : ParsedCommandLine ;
15291529 /**
15301530 * Read tsconfig.json file
@@ -1551,7 +1551,7 @@ declare module "typescript" {
15511551 */
15521552 function parseConfigFile ( json : any , host : ParseConfigHost , basePath : string ) : ParsedCommandLine ;
15531553}
1554- declare module "typescript" {
1554+ declare namespace ts {
15551555 /** The version of the language service API */
15561556 let servicesVersion : string ;
15571557 interface Node {
@@ -2139,3 +2139,5 @@ declare module "typescript" {
21392139 */
21402140 function getDefaultLibFilePath ( options : CompilerOptions ) : string ;
21412141}
2142+
2143+ export = ts ;
0 commit comments