@@ -21,6 +21,34 @@ module ts {
2121
2222 var emptyArray : any [ ] = [ ] ;
2323 var emptySymbols : SymbolTable = { } ;
24+
25+ var checker : TypeChecker = {
26+ getProgram : ( ) => program ,
27+ getDiagnostics : getDiagnostics ,
28+ getGlobalDiagnostics : getGlobalDiagnostics ,
29+ getNodeCount : ( ) => sum ( program . getSourceFiles ( ) , "nodeCount" ) ,
30+ getIdentifierCount : ( ) => sum ( program . getSourceFiles ( ) , "identifierCount" ) ,
31+ getSymbolCount : ( ) => sum ( program . getSourceFiles ( ) , "symbolCount" ) ,
32+ getTypeCount : ( ) => typeCount ,
33+ checkProgram : checkProgram ,
34+ emitFiles : invokeEmitter ,
35+ getSymbolOfNode : getSymbolOfNode ,
36+ getParentOfSymbol : getParentOfSymbol ,
37+ getTypeOfSymbol : getTypeOfSymbol ,
38+ getDeclaredTypeOfSymbol : getDeclaredTypeOfSymbol ,
39+ getPropertiesOfType : getPropertiesOfType ,
40+ getPropertyOfType : getPropertyOfType ,
41+ getSignaturesOfType : getSignaturesOfType ,
42+ getIndexTypeOfType : getIndexTypeOfType ,
43+ getReturnTypeOfSignature : getReturnTypeOfSignature ,
44+ resolveEntityName : resolveEntityName ,
45+ getSymbolsInScope : getSymbolsInScope ,
46+ getSymbolInfo : getSymbolInfo ,
47+ getTypeOfExpression : getTypeOfExpression ,
48+ typeToString : typeToString ,
49+ symbolToString : symbolToString ,
50+ getAugmentedPropertiesOfApparentType : getAugmentedPropertiesOfApparentType
51+ } ;
2452
2553 var undefinedSymbol = createSymbol ( SymbolFlags . Property | SymbolFlags . Transient , "undefined" ) ;
2654 var argumentsSymbol = createSymbol ( SymbolFlags . Property | SymbolFlags . Transient , "arguments" ) ;
@@ -68,34 +96,6 @@ module ts {
6896 var diagnostics : Diagnostic [ ] = [ ] ;
6997 var diagnosticsModified : boolean = false ;
7098
71- var checker : TypeChecker = {
72- getProgram : ( ) => program ,
73- getDiagnostics : getDiagnostics ,
74- getGlobalDiagnostics : getGlobalDiagnostics ,
75- getNodeCount : ( ) => sum ( program . getSourceFiles ( ) , "nodeCount" ) ,
76- getIdentifierCount : ( ) => sum ( program . getSourceFiles ( ) , "identifierCount" ) ,
77- getSymbolCount : ( ) => sum ( program . getSourceFiles ( ) , "symbolCount" ) ,
78- getTypeCount : ( ) => typeCount ,
79- checkProgram : checkProgram ,
80- emitFiles : invokeEmitter ,
81- getSymbolOfNode : getSymbolOfNode ,
82- getParentOfSymbol : getParentOfSymbol ,
83- getTypeOfSymbol : getTypeOfSymbol ,
84- getDeclaredTypeOfSymbol : getDeclaredTypeOfSymbol ,
85- getPropertiesOfType : getPropertiesOfType ,
86- getPropertyOfType : getPropertyOfType ,
87- getSignaturesOfType : getSignaturesOfType ,
88- getIndexTypeOfType : getIndexTypeOfType ,
89- getReturnTypeOfSignature : getReturnTypeOfSignature ,
90- resolveEntityName : resolveEntityName ,
91- getSymbolsInScope : getSymbolsInScope ,
92- getSymbolInfo : getSymbolInfo ,
93- getTypeOfExpression : getTypeOfExpression ,
94- typeToString : typeToString ,
95- symbolToString : symbolToString ,
96- getAugmentedPropertiesOfApparentType : getAugmentedPropertiesOfApparentType
97- } ;
98-
9999 function addDiagnostic ( diagnostic : Diagnostic ) {
100100 diagnostics . push ( diagnostic ) ;
101101 diagnosticsModified = true ;
0 commit comments