Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Sep 5, 2021
1 parent cd48b25 commit 1e4b373
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 1 deletion.
@@ -0,0 +1 @@
export * as mod from 'module';
@@ -0,0 +1 @@
export * from 'my-module';
Expand Up @@ -6,6 +6,8 @@ import type { ExportKind } from '../ExportAndImportKind';

export interface ExportAllDeclaration extends BaseNode {
type: AST_NODE_TYPES.ExportAllDeclaration;
// this should only be a non-null StringLiteral, but TS's error permissiveness allows Expression
// we should address this when we add parser errors.
source: Expression | null;
exportKind: ExportKind;
exported: Identifier | null;
Expand Down
@@ -0,0 +1 @@
export default class {}
@@ -0,0 +1 @@
export default function () {}
@@ -0,0 +1 @@
export default () => {};
@@ -0,0 +1 @@
export default class Foo {}
@@ -0,0 +1 @@
export default (class Foo {});
@@ -0,0 +1 @@
export default function foo() {}
@@ -0,0 +1 @@
export default interface Foo {}
@@ -0,0 +1,2 @@
const x = 1;
export default x;
Expand Up @@ -6,6 +6,10 @@ import type { ExportKind } from '../ExportAndImportKind';

export interface ExportDefaultDeclaration extends BaseNode {
type: AST_NODE_TYPES.ExportDefaultDeclaration;
declaration: ExportDeclaration | Expression;
declaration:
| // TODO - the following are disallowed syntactically, but allowed by TS error recovery:
// TSEnumDeclaration, TSModuleDeclaration, TSTypeAliasDeclaration, VariableDeclaration
ExportDeclaration
| Expression;
exportKind: ExportKind;
}

0 comments on commit 1e4b373

Please sign in to comment.