@@ -605,43 +605,8 @@ func (r *emitResolver) IsLiteralConstDeclaration(node *ast.Node) bool {
605
605
}
606
606
607
607
func (r * emitResolver ) IsExpandoFunctionDeclaration (node * ast.Node ) bool {
608
- if ! ast .IsParseTreeNode (node ) {
609
- return false
610
- }
611
-
612
- r .checkerMu .Lock ()
613
- defer r .checkerMu .Unlock ()
614
-
615
- var declaration * ast.Node
616
- if ast .IsVariableDeclaration (node ) {
617
- initializer := node .Initializer ()
618
- if node .Type () == nil && (ast .IsInJSFile (node ) || ast .IsVarConstLike (node )) && ast .IsExpandoInitializer (initializer ) {
619
- declaration = initializer
620
- }
621
- }
622
-
623
- if ast .IsFunctionDeclaration (node ) {
624
- declaration = node
625
- }
626
-
627
- if declaration == nil {
628
- return false
629
- }
630
-
631
- symbol := r .checker .getSymbolOfDeclaration (declaration )
632
- if symbol == nil || (symbol .Flags & (ast .SymbolFlagsFunction | ast .SymbolFlagsVariable )) == 0 {
633
- return false
634
- }
635
-
636
- exports := r .checker .getExportsOfSymbol (symbol )
637
- for _ , p := range exports {
638
- if p .ValueDeclaration == nil || p .Flags & ast .SymbolFlagsValue == 0 || p .Flags & ast .SymbolFlagsAssignment == 0 {
639
- continue
640
- }
641
- if p .ValueDeclaration .Flags & ast .NodeFlagsAmbient == 0 {
642
- return true
643
- }
644
- }
608
+ // node = r.emitContext.ParseNode(node)
609
+ // !!! TODO: expando function support
645
610
return false
646
611
}
647
612
@@ -882,26 +847,6 @@ func (r *emitResolver) GetReferencedValueDeclarations(node *ast.IdentifierNode)
882
847
return r .getReferenceResolver ().GetReferencedValueDeclarations (node )
883
848
}
884
849
885
- func (r * emitResolver ) GetPropertiesOfContainerFunction (node * ast.Node ) []* ast.Symbol {
886
- props := []* ast.Symbol {}
887
-
888
- if ! ast .IsParseTreeNode (node ) {
889
- return props
890
- }
891
-
892
- if ast .IsFunctionDeclaration (node ) {
893
- r .checkerMu .Lock ()
894
- defer r .checkerMu .Unlock ()
895
-
896
- symbol := r .checker .getSymbolOfDeclaration (node )
897
- if symbol == nil {
898
- return props
899
- }
900
- props = r .checker .getPropertiesOfType (r .checker .getTypeOfSymbol (symbol ))
901
- }
902
- return props
903
- }
904
-
905
850
// TODO: the emit resolver being responsible for some amount of node construction is a very leaky abstraction,
906
851
// and requires giving it access to a lot of context it's otherwise not required to have, which also further complicates the API
907
852
// and likely reduces performance. There's probably some refactoring that could be done here to simplify this.
0 commit comments