(node *ast.Node)
| 858 | } |
| 859 | |
| 860 | func (b *Binder) bindExportAssignment(node *ast.Node) { |
| 861 | container := b.container |
| 862 | if container.Symbol() == nil && ast.IsExportAssignment(node) { |
| 863 | // Incorrect export assignment in some sort of block construct |
| 864 | b.bindAnonymousDeclaration(node, ast.SymbolFlagsValue, b.getDeclarationName(node)) |
| 865 | } else { |
| 866 | // If there is an `export default x;` alias declaration, can't `export default` anything else. |
| 867 | // (In contrast, you can still have `export default function f() {}` and `export default interface I {}`.) |
| 868 | flags := core.IfElse(ast.ExpressionIsAlias(node.Expression()), ast.SymbolFlagsAlias, ast.SymbolFlagsProperty) |
| 869 | symbol := b.declareSymbol(ast.GetExports(container.Symbol()), container.Symbol(), node, flags, ast.SymbolFlagsAll) |
| 870 | if node.AsExportAssignment().IsExportEquals { |
| 871 | // Ensure export assignments have a ValueDeclaration set. |
| 872 | SetValueDeclaration(symbol, node) |
| 873 | } |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | func (b *Binder) bindJsxAttributes(node *ast.Node) { |
| 878 | b.bindAnonymousDeclaration(node, ast.SymbolFlagsObjectLiteral, ast.InternalSymbolNameJSXAttributes) |
no test coverage detected