@@ -25,6 +25,34 @@ module ts {
2525
2626 var emptyArray : any [ ] = [ ] ;
2727 var emptySymbols : SymbolTable = { } ;
28+
29+ var checker : TypeChecker = {
30+ getProgram : ( ) => program ,
31+ getDiagnostics : getDiagnostics ,
32+ getGlobalDiagnostics : getGlobalDiagnostics ,
33+ getNodeCount : ( ) => sum ( program . getSourceFiles ( ) , "nodeCount" ) ,
34+ getIdentifierCount : ( ) => sum ( program . getSourceFiles ( ) , "identifierCount" ) ,
35+ getSymbolCount : ( ) => sum ( program . getSourceFiles ( ) , "symbolCount" ) ,
36+ getTypeCount : ( ) => typeCount ,
37+ checkProgram : checkProgram ,
38+ emitFiles : invokeEmitter ,
39+ getSymbolOfNode : getSymbolOfNode ,
40+ getParentOfSymbol : getParentOfSymbol ,
41+ getTypeOfSymbol : getTypeOfSymbol ,
42+ getDeclaredTypeOfSymbol : getDeclaredTypeOfSymbol ,
43+ getPropertiesOfType : getPropertiesOfType ,
44+ getPropertyOfType : getPropertyOfType ,
45+ getSignaturesOfType : getSignaturesOfType ,
46+ getIndexTypeOfType : getIndexTypeOfType ,
47+ getReturnTypeOfSignature : getReturnTypeOfSignature ,
48+ resolveEntityName : resolveEntityName ,
49+ getSymbolsInScope : getSymbolsInScope ,
50+ getSymbolInfo : getSymbolInfo ,
51+ getTypeOfExpression : getTypeOfExpression ,
52+ typeToString : typeToString ,
53+ symbolToString : symbolToString ,
54+ getAugmentedPropertiesOfApparentType : getAugmentedPropertiesOfApparentType
55+ } ;
2856
2957 var undefinedSymbol = createSymbol ( SymbolFlags . Property | SymbolFlags . Transient , "undefined" ) ;
3058 var argumentsSymbol = createSymbol ( SymbolFlags . Property | SymbolFlags . Transient , "arguments" ) ;
@@ -71,34 +99,6 @@ module ts {
7199 var diagnostics : Diagnostic [ ] = [ ] ;
72100 var diagnosticsModified : boolean = false ;
73101
74- var checker : TypeChecker = {
75- getProgram : ( ) => program ,
76- getDiagnostics : getDiagnostics ,
77- getGlobalDiagnostics : getGlobalDiagnostics ,
78- getNodeCount : ( ) => sum ( program . getSourceFiles ( ) , "nodeCount" ) ,
79- getIdentifierCount : ( ) => sum ( program . getSourceFiles ( ) , "identifierCount" ) ,
80- getSymbolCount : ( ) => sum ( program . getSourceFiles ( ) , "symbolCount" ) ,
81- getTypeCount : ( ) => typeCount ,
82- checkProgram : checkProgram ,
83- emitFiles : invokeEmitter ,
84- getSymbolOfNode : getSymbolOfNode ,
85- getParentOfSymbol : getParentOfSymbol ,
86- getTypeOfSymbol : getTypeOfSymbol ,
87- getDeclaredTypeOfSymbol : getDeclaredTypeOfSymbol ,
88- getPropertiesOfType : getPropertiesOfType ,
89- getPropertyOfType : getPropertyOfType ,
90- getSignaturesOfType : getSignaturesOfType ,
91- getIndexTypeOfType : getIndexTypeOfType ,
92- getReturnTypeOfSignature : getReturnTypeOfSignature ,
93- resolveEntityName : resolveEntityName ,
94- getSymbolsInScope : getSymbolsInScope ,
95- getSymbolInfo : getSymbolInfo ,
96- getTypeOfExpression : getTypeOfExpression ,
97- typeToString : typeToString ,
98- symbolToString : symbolToString ,
99- getAugmentedPropertiesOfApparentType : getAugmentedPropertiesOfApparentType
100- } ;
101-
102102 function addDiagnostic ( diagnostic : Diagnostic ) {
103103 diagnostics . push ( diagnostic ) ;
104104 diagnosticsModified = true ;
0 commit comments