Check exported bindings are defined (#9589)

* Check exported bindings are defined

* Add tests

* Update flow whitelist

* Add tests for builtins
This commit is contained in:
Daniel Tschinder 2019-02-26 13:28:10 -08:00 committed by GitHub
parent e883ff295d
commit 43eed1ac92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
81 changed files with 1594 additions and 315 deletions

View File

@ -0,0 +1,3 @@
{
"strictMode": false
}

View File

@ -17,6 +17,7 @@ declare export * from 'asd';
declare export { a, b };
declare export {};
declare export { c, d } from 'bar';
var a, b;
declare module B {
declare export type B = {};

View File

@ -26,6 +26,7 @@ declare export * from 'asd';
declare export { a, b };
declare export {};
declare export { c, d } from 'bar';
var a, b;
declare module B {
declare export type B = {};
declare export interface Moon {}

View File

@ -107,7 +107,7 @@ import { type Foo12 } from "bar";
import { typeof Foo13 } from "bar";
import { type Foo as Bar1 } from "bar";
import { typeof Foo as Bar2 } from "bar";
export type { foo };
export type { foo1 };
export type { bar } from "bar";
export interface baz { p: number }
export interface qux<T> { p: T }

View File

@ -231,7 +231,7 @@ import { type Foo12 } from "bar";
import { typeof Foo13 } from "bar";
import { type Foo as Bar1 } from "bar";
import { typeof Foo as Bar2 } from "bar";
export type { foo };
export type { foo1 };
export type { bar } from "bar";
export interface baz {
p: number

View File

@ -1,3 +1,4 @@
var a, c;
export * from "OK"
export { name } from "OK"
export { a as b, c as d } from "hello"

View File

@ -1,3 +1,4 @@
var a, c;
export * from "OK";
export { name } from "OK";
export { a as b, c as d } from "hello";

View File

@ -1 +1,2 @@
export { foo };
var foo;

View File

@ -1 +1,2 @@
export { foo };
var foo;

View File

@ -1 +1,2 @@
export { foo, bar };
var foo, bar;

View File

@ -1 +1,2 @@
export { foo, bar };
var foo, bar;

View File

@ -1 +1,2 @@
export { foo as bar };
var foo;

View File

@ -1 +1,2 @@
export { foo as bar };
var foo;

View File

@ -1 +1,2 @@
export { foo as default };
var foo;

View File

@ -1 +1,2 @@
export { foo as default };
var foo;

View File

@ -1 +1,2 @@
export { foo as default, bar };
var foo, bar;

View File

@ -1 +1,2 @@
export { foo as default, bar };
var foo, bar;

View File

@ -0,0 +1,3 @@
{
"strictMode": false
}

View File

@ -0,0 +1,3 @@
{
"strictMode": false
}

View File

@ -489,7 +489,7 @@ suites.forEach(function(testSuite) {
const actualAst = parse(actualCode, {
filename: actual.loc,
plugins: task.options.plugins || [],
strictMode: false,
strictMode: task.options.strictMode === false ? false : true,
sourceType: "module",
sourceMaps: !!task.sourceMap,
});

View File

@ -49,6 +49,14 @@ export default class StatementParser extends ExpressionParser {
this.parseBlockBody(program, true, true, tt.eof);
if (this.inModule && this.scope.undefinedExports.size > 0) {
for (const [name] of Array.from(this.scope.undefinedExports)) {
const pos = this.scope.undefinedExports.get(name);
// $FlowIssue
this.raise(pos, `Export '${name}' is not defined`);
}
}
file.program = this.finishNode(program, "Program");
file.comments = this.state.comments;
@ -1631,7 +1639,7 @@ export default class StatementParser extends ExpressionParser {
}
if (isFromRequired || hasSpecifiers || hasDeclaration) {
this.checkExport(node, true);
this.checkExport(node, true, false, !!node.source);
return this.finishNode(node, "ExportNamedDeclaration");
}
@ -1845,8 +1853,9 @@ export default class StatementParser extends ExpressionParser {
checkExport(
node: N.ExportNamedDeclaration,
checkNames: ?boolean,
checkNames?: boolean,
isDefault?: boolean,
isFrom?: boolean,
): void {
if (checkNames) {
// Check for duplicate exports
@ -1857,6 +1866,11 @@ export default class StatementParser extends ExpressionParser {
// Named exports
for (const specifier of node.specifiers) {
this.checkDuplicateExports(specifier, specifier.exported.name);
// check if export is defined
// $FlowIgnore
if (!isFrom && specifier.local) {
this.scope.checkLocalExport(specifier.local);
}
}
} else if (node.declaration) {
// Exported declarations

View File

@ -831,6 +831,7 @@ export type ExportNamedDeclaration = NodeBase & {
export type ExportSpecifier = NodeBase & {
type: "ExportSpecifier",
exported: Identifier,
local: Identifier,
};
export type ExportDefaultSpecifier = NodeBase & {

View File

@ -16,6 +16,7 @@ import {
type BindingTypes,
SCOPE_CLASS,
} from "./scopeflags";
import * as N from "../types";
// Start an AST node, attaching a start offset.
class Scope {
@ -40,6 +41,7 @@ export default class ScopeHandler {
scopeStack: Array<Scope> = [];
raise: raiseFunction;
inModule: boolean;
undefinedExports: Map<string, number> = new Map();
constructor(raise: raiseFunction, inModule: boolean) {
this.raise = raise;
@ -95,6 +97,9 @@ export default class ScopeHandler {
scope.functions.indexOf(name) > -1 ||
scope.var.indexOf(name) > -1;
scope.lexical.push(name);
if (this.inModule && scope.flags & SCOPE_PROGRAM) {
this.undefinedExports.delete(name);
}
} else if (bindingType === BIND_SIMPLE_CATCH) {
const scope = this.currentScope();
scope.lexical.push(name);
@ -122,6 +127,10 @@ export default class ScopeHandler {
}
scope.var.push(name);
if (this.inModule && scope.flags & SCOPE_PROGRAM) {
this.undefinedExports.delete(name);
}
if (scope.flags & SCOPE_VAR) break;
}
}
@ -130,6 +139,16 @@ export default class ScopeHandler {
}
}
checkLocalExport(id: N.Identifier) {
// scope.functions must be empty as Module code is always strict.
if (
this.scopeStack[0].lexical.indexOf(id.name) === -1 &&
this.scopeStack[0].var.indexOf(id.name) === -1
) {
this.undefinedExports.set(id.name, id.start);
}
}
currentScope(): Scope {
return this.scopeStack[this.scopeStack.length - 1];
}

View File

@ -0,0 +1 @@
export { encrypt as default };

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"throws": "Export 'encrypt' is not defined (1:9)"
}

View File

@ -0,0 +1,2 @@
export { encrypt as decrypt };
function decrypt() {}

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"throws": "Export 'encrypt' is not defined (1:9)"
}

View File

@ -0,0 +1,4 @@
{
function encrypt() {}
}
export { encrypt }

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"throws": "Export 'encrypt' is not defined (4:9)"
}

View File

@ -0,0 +1 @@
export { Object as Obj };

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"throws": "Export 'Object' is not defined (1:9)"
}

View File

@ -0,0 +1 @@
export { Object };

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"throws": "Export 'Object' is not defined (1:9)"
}

View File

@ -0,0 +1,2 @@
export { encrypt };
if (true) function encrypt() {}

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"throws": "In strict mode code, functions can only be declared at top level or inside a block (2:10)"
}

View File

@ -0,0 +1,4 @@
{
var encrypt
}
export { encrypt }

View File

@ -0,0 +1,3 @@
{
"sourceType": "module"
}

View File

@ -0,0 +1,172 @@
{
"type": "File",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"column": 18
}
},
"program": {
"type": "Program",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"column": 18
}
},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "BlockStatement",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 4,
"end": 15,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 13
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 8,
"end": 15,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 13
}
},
"id": {
"type": "Identifier",
"start": 8,
"end": 15,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 13
},
"identifierName": "encrypt"
},
"name": "encrypt"
},
"init": null
}
],
"kind": "var"
}
],
"directives": []
},
{
"type": "ExportNamedDeclaration",
"start": 18,
"end": 36,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 18
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 27,
"end": 34,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 27,
"end": 34,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
},
"identifierName": "encrypt"
},
"name": "encrypt"
},
"exported": {
"type": "Identifier",
"start": 27,
"end": 34,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
},
"identifierName": "encrypt"
},
"name": "encrypt"
}
}
],
"source": null,
"declaration": null
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
export { encrypt };

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"throws": "Export 'encrypt' is not defined (1:9)"
}

View File

@ -1 +1,3 @@
const toString = 1;
export { toString };

View File

@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 20,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 3,
"column": 20
}
},
"program": {
"type": "Program",
"start": 0,
"end": 20,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 3,
"column": 20
}
},
@ -30,9 +30,9 @@
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "VariableDeclaration",
"start": 0,
"end": 20,
"end": 19,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,105 @@
},
"end": {
"line": 1,
"column": 20
"column": 19
}
},
"declaration": null,
"specifiers": [
"declarations": [
{
"type": "ExportSpecifier",
"start": 9,
"end": 17,
"type": "VariableDeclarator",
"start": 6,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
"column": 6
},
"end": {
"line": 1,
"column": 18
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 14
},
"identifierName": "toString"
},
"name": "toString"
},
"init": {
"type": "NumericLiteral",
"start": 17,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 18
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
}
],
"kind": "const"
},
{
"type": "ExportNamedDeclaration",
"start": 21,
"end": 41,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 20
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 30,
"end": 38,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 9,
"end": 17,
"start": 30,
"end": 38,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 17
},
"identifierName": "toString"
@ -78,15 +147,15 @@
},
"exported": {
"type": "Identifier",
"start": 9,
"end": 17,
"start": 30,
"end": 38,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 17
},
"identifierName": "toString"
@ -95,7 +164,8 @@
}
}
],
"source": null
"source": null,
"declaration": null
}
],
"directives": []

View File

@ -1 +1,2 @@
export { encrypt }
function encrypt () {}

View File

@ -1,29 +1,29 @@
{
"type": "File",
"start": 0,
"end": 18,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
"line": 2,
"column": 22
}
},
"program": {
"type": "Program",
"start": 0,
"end": 18,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
"line": 2,
"column": 22
}
},
"sourceType": "module",
@ -43,7 +43,6 @@
"column": 18
}
},
"declaration": null,
"specifiers": [
{
"type": "ExportSpecifier",
@ -95,7 +94,60 @@
}
}
],
"source": null
"source": null,
"declaration": null
},
{
"type": "FunctionDeclaration",
"start": 19,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 22
}
},
"id": {
"type": "Identifier",
"start": 28,
"end": 35,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 16
},
"identifierName": "encrypt"
},
"name": "encrypt"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 39,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 20
},
"end": {
"line": 2,
"column": 22
}
},
"body": [],
"directives": []
}
}
],
"directives": []

View File

@ -1 +1,3 @@
function encrypt () {}
class decrypt{}
export { encrypt, decrypt }

View File

@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 27,
"end": 66,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 3,
"column": 27
}
},
"program": {
"type": "Program",
"start": 0,
"end": 27,
"end": 66,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 3,
"column": 27
}
},
@ -30,9 +30,9 @@
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "FunctionDeclaration",
"start": 0,
"end": 27,
"end": 22,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,136 @@
},
"end": {
"line": 1,
"column": 22
}
},
"id": {
"type": "Identifier",
"start": 9,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "encrypt"
},
"name": "encrypt"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 20,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 22
}
},
"body": [],
"directives": []
}
},
{
"type": "ClassDeclaration",
"start": 23,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 15
}
},
"id": {
"type": "Identifier",
"start": 29,
"end": 36,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 13
},
"identifierName": "decrypt"
},
"name": "decrypt"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 36,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 15
}
},
"body": []
}
},
{
"type": "ExportNamedDeclaration",
"start": 39,
"end": 66,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 27
}
},
"declaration": null,
"specifiers": [
{
"type": "ExportSpecifier",
"start": 9,
"end": 16,
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 9,
"end": 16,
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 16
},
"identifierName": "encrypt"
@ -78,15 +178,15 @@
},
"exported": {
"type": "Identifier",
"start": 9,
"end": 16,
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 16
},
"identifierName": "encrypt"
@ -96,29 +196,29 @@
},
{
"type": "ExportSpecifier",
"start": 18,
"end": 25,
"start": 57,
"end": 64,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 18
},
"end": {
"line": 1,
"line": 3,
"column": 25
}
},
"local": {
"type": "Identifier",
"start": 18,
"end": 25,
"start": 57,
"end": 64,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 18
},
"end": {
"line": 1,
"line": 3,
"column": 25
},
"identifierName": "decrypt"
@ -127,15 +227,15 @@
},
"exported": {
"type": "Identifier",
"start": 18,
"end": 25,
"start": 57,
"end": 64,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 18
},
"end": {
"line": 1,
"line": 3,
"column": 25
},
"identifierName": "decrypt"
@ -144,7 +244,8 @@
}
}
],
"source": null
"source": null,
"declaration": null
}
],
"directives": []

View File

@ -1 +1,2 @@
import encrypt from "";
export { encrypt as default }

View File

@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 29,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 29
}
},
"program": {
"type": "Program",
"start": 0,
"end": 29,
"end": 53,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 29
}
},
@ -30,9 +30,9 @@
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "ImportDeclaration",
"start": 0,
"end": 29,
"end": 23,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,104 @@
},
"end": {
"line": 1,
"column": 29
"column": 23
}
},
"declaration": null,
"specifiers": [
{
"type": "ExportSpecifier",
"start": 9,
"end": 27,
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 9
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
},
"identifierName": "encrypt"
},
"name": "encrypt"
}
}
],
"source": {
"type": "StringLiteral",
"start": 20,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 22
}
},
"extra": {
"rawValue": "",
"raw": "\"\""
},
"value": ""
}
},
{
"type": "ExportNamedDeclaration",
"start": 24,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 29
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 33,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 27
}
},
"local": {
"type": "Identifier",
"start": 9,
"end": 16,
"start": 33,
"end": 40,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 9
},
"end": {
"line": 1,
"line": 2,
"column": 16
},
"identifierName": "encrypt"
@ -78,15 +146,15 @@
},
"exported": {
"type": "Identifier",
"start": 20,
"end": 27,
"start": 44,
"end": 51,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 20
},
"end": {
"line": 1,
"line": 2,
"column": 27
},
"identifierName": "default"
@ -95,7 +163,8 @@
}
}
],
"source": null
"source": null,
"declaration": null
}
],
"directives": []

View File

@ -1 +1,3 @@
function encrypt() {}
class decrypt {}
export { encrypt, decrypt as dec }

View File

@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 34,
"end": 73,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 3,
"column": 34
}
},
"program": {
"type": "Program",
"start": 0,
"end": 34,
"end": 73,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 3,
"column": 34
}
},
@ -30,9 +30,9 @@
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "FunctionDeclaration",
"start": 0,
"end": 34,
"end": 21,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,136 @@
},
"end": {
"line": 1,
"column": 21
}
},
"id": {
"type": "Identifier",
"start": 9,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "encrypt"
},
"name": "encrypt"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 19,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 21
}
},
"body": [],
"directives": []
}
},
{
"type": "ClassDeclaration",
"start": 22,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 16
}
},
"id": {
"type": "Identifier",
"start": 28,
"end": 35,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 13
},
"identifierName": "decrypt"
},
"name": "decrypt"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 36,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 14
},
"end": {
"line": 2,
"column": 16
}
},
"body": []
}
},
{
"type": "ExportNamedDeclaration",
"start": 39,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 34
}
},
"declaration": null,
"specifiers": [
{
"type": "ExportSpecifier",
"start": 9,
"end": 16,
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 9,
"end": 16,
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 16
},
"identifierName": "encrypt"
@ -78,15 +178,15 @@
},
"exported": {
"type": "Identifier",
"start": 9,
"end": 16,
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 9
},
"end": {
"line": 1,
"line": 3,
"column": 16
},
"identifierName": "encrypt"
@ -96,29 +196,29 @@
},
{
"type": "ExportSpecifier",
"start": 18,
"end": 32,
"start": 57,
"end": 71,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 18
},
"end": {
"line": 1,
"line": 3,
"column": 32
}
},
"local": {
"type": "Identifier",
"start": 18,
"end": 25,
"start": 57,
"end": 64,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 18
},
"end": {
"line": 1,
"line": 3,
"column": 25
},
"identifierName": "decrypt"
@ -127,15 +227,15 @@
},
"exported": {
"type": "Identifier",
"start": 29,
"end": 32,
"start": 68,
"end": 71,
"loc": {
"start": {
"line": 1,
"line": 3,
"column": 29
},
"end": {
"line": 1,
"line": 3,
"column": 32
},
"identifierName": "dec"
@ -144,7 +244,8 @@
}
}
],
"source": null
"source": null,
"declaration": null
}
],
"directives": []

View File

@ -1 +1,2 @@
export {foo as default};
var foo;

View File

@ -1,29 +1,29 @@
{
"type": "File",
"start": 0,
"end": 24,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
"line": 2,
"column": 8
}
},
"program": {
"type": "Program",
"start": 0,
"end": 24,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
"line": 2,
"column": 8
}
},
"sourceType": "module",
@ -43,7 +43,6 @@
"column": 24
}
},
"declaration": null,
"specifiers": [
{
"type": "ExportSpecifier",
@ -95,7 +94,59 @@
}
}
],
"source": null
"source": null,
"declaration": null
},
{
"type": "VariableDeclaration",
"start": 25,
"end": 33,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 8
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 29,
"end": 32,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 29,
"end": 32,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 7
},
"identifierName": "foo"
},
"name": "foo"
},
"init": null
}
],
"kind": "var"
}
],
"directives": []

View File

@ -1 +1,2 @@
var foo, bar;
export {foo as bar};

View File

@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 20,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 20
}
},
"program": {
"type": "Program",
"start": 0,
"end": 20,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 20
}
},
@ -30,9 +30,9 @@
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "VariableDeclaration",
"start": 0,
"end": 20,
"end": 13,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,119 @@
},
"end": {
"line": 1,
"column": 20
"column": 13
}
},
"declaration": null,
"specifiers": [
"declarations": [
{
"type": "ExportSpecifier",
"start": 8,
"end": 18,
"type": "VariableDeclarator",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 8
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
},
"identifierName": "foo"
},
"name": "foo"
},
"init": null
},
{
"type": "VariableDeclarator",
"start": 9,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 12
}
},
"id": {
"type": "Identifier",
"start": 9,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "bar"
},
"name": "bar"
},
"init": null
}
],
"kind": "var"
},
{
"type": "ExportNamedDeclaration",
"start": 14,
"end": 34,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 20
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 22,
"end": 32,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 8,
"end": 11,
"start": 22,
"end": 25,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 8
},
"end": {
"line": 1,
"line": 2,
"column": 11
},
"identifierName": "foo"
@ -78,15 +161,15 @@
},
"exported": {
"type": "Identifier",
"start": 15,
"end": 18,
"start": 29,
"end": 32,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 15
},
"end": {
"line": 1,
"line": 2,
"column": 18
},
"identifierName": "bar"
@ -95,7 +178,8 @@
}
}
],
"source": null
"source": null,
"declaration": null
}
],
"directives": []

View File

@ -1 +1,2 @@
export {foo as default, bar};
var foo, bar;

View File

@ -1,29 +1,29 @@
{
"type": "File",
"start": 0,
"end": 29,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 29
"line": 2,
"column": 13
}
},
"program": {
"type": "Program",
"start": 0,
"end": 29,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 29
"line": 2,
"column": 13
}
},
"sourceType": "module",
@ -43,7 +43,6 @@
"column": 29
}
},
"declaration": null,
"specifiers": [
{
"type": "ExportSpecifier",
@ -144,7 +143,92 @@
}
}
],
"source": null
"source": null,
"declaration": null
},
{
"type": "VariableDeclaration",
"start": 30,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 13
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 34,
"end": 37,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 34,
"end": 37,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 7
},
"identifierName": "foo"
},
"name": "foo"
},
"init": null
},
{
"type": "VariableDeclarator",
"start": 39,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 12
}
},
"id": {
"type": "Identifier",
"start": 39,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 12
},
"identifierName": "bar"
},
"name": "bar"
},
"init": null
}
],
"kind": "var"
}
],
"directives": []

View File

@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 13,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 13
}
},
"program": {
"type": "Program",
"start": 0,
"end": 13,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 13
}
},
@ -30,9 +30,9 @@
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "VariableDeclaration",
"start": 0,
"end": 13,
"end": 8,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,86 @@
},
"end": {
"line": 1,
"column": 13
"column": 8
}
},
"declaration": null,
"specifiers": [
"declarations": [
{
"type": "ExportSpecifier",
"start": 8,
"end": 11,
"type": "VariableDeclarator",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 8
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
},
"identifierName": "foo"
},
"name": "foo"
},
"init": null
}
],
"kind": "let"
},
{
"type": "ExportNamedDeclaration",
"start": 9,
"end": 22,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 13
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 8,
"end": 11,
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 8
},
"end": {
"line": 1,
"line": 2,
"column": 11
},
"identifierName": "foo"
@ -78,15 +128,15 @@
},
"exported": {
"type": "Identifier",
"start": 8,
"end": 11,
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 8
},
"end": {
"line": 1,
"line": 2,
"column": 11
},
"identifierName": "foo"
@ -95,7 +145,8 @@
}
}
],
"source": null
"source": null,
"declaration": null
}
],
"directives": []

View File

@ -1 +1,3 @@
var bar;
export {foo, bar,};
var foo;

View File

@ -1,38 +1,38 @@
{
"type": "File",
"start": 0,
"end": 19,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
"line": 3,
"column": 8
}
},
"program": {
"type": "Program",
"start": 0,
"end": 19,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
"line": 3,
"column": 8
}
},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "VariableDeclaration",
"start": 0,
"end": 19,
"end": 8,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,86 @@
},
"end": {
"line": 1,
"column": 19
"column": 8
}
},
"declaration": null,
"specifiers": [
"declarations": [
{
"type": "ExportSpecifier",
"start": 8,
"end": 11,
"type": "VariableDeclarator",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 8
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
},
"identifierName": "bar"
},
"name": "bar"
},
"init": null
}
],
"kind": "var"
},
{
"type": "ExportNamedDeclaration",
"start": 9,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 19
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 8,
"end": 11,
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 8
},
"end": {
"line": 1,
"line": 2,
"column": 11
},
"identifierName": "foo"
@ -78,15 +128,15 @@
},
"exported": {
"type": "Identifier",
"start": 8,
"end": 11,
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 8
},
"end": {
"line": 1,
"line": 2,
"column": 11
},
"identifierName": "foo"
@ -96,29 +146,29 @@
},
{
"type": "ExportSpecifier",
"start": 13,
"end": 16,
"start": 22,
"end": 25,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 13
},
"end": {
"line": 1,
"line": 2,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 13,
"end": 16,
"start": 22,
"end": 25,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 13
},
"end": {
"line": 1,
"line": 2,
"column": 16
},
"identifierName": "bar"
@ -127,15 +177,15 @@
},
"exported": {
"type": "Identifier",
"start": 13,
"end": 16,
"start": 22,
"end": 25,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 13
},
"end": {
"line": 1,
"line": 2,
"column": 16
},
"identifierName": "bar"
@ -144,7 +194,59 @@
}
}
],
"source": null
"source": null,
"declaration": null
},
{
"type": "VariableDeclaration",
"start": 29,
"end": 37,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 8
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 33,
"end": 36,
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 33,
"end": 36,
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 7
},
"identifierName": "foo"
},
"name": "foo"
},
"init": null
}
],
"kind": "var"
}
],
"directives": []

View File

@ -1 +1,3 @@
var foo;
export {foo, bar};
var bar;

View File

@ -1,38 +1,38 @@
{
"type": "File",
"start": 0,
"end": 18,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
"line": 3,
"column": 8
}
},
"program": {
"type": "Program",
"start": 0,
"end": 18,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
"line": 3,
"column": 8
}
},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "VariableDeclaration",
"start": 0,
"end": 18,
"end": 8,
"loc": {
"start": {
"line": 1,
@ -40,36 +40,86 @@
},
"end": {
"line": 1,
"column": 18
"column": 8
}
},
"declaration": null,
"specifiers": [
"declarations": [
{
"type": "ExportSpecifier",
"start": 8,
"end": 11,
"type": "VariableDeclarator",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 8
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
},
"identifierName": "foo"
},
"name": "foo"
},
"init": null
}
],
"kind": "var"
},
{
"type": "ExportNamedDeclaration",
"start": 9,
"end": 27,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 18
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 8,
"end": 11,
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 8
},
"end": {
"line": 1,
"line": 2,
"column": 11
},
"identifierName": "foo"
@ -78,15 +128,15 @@
},
"exported": {
"type": "Identifier",
"start": 8,
"end": 11,
"start": 17,
"end": 20,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 8
},
"end": {
"line": 1,
"line": 2,
"column": 11
},
"identifierName": "foo"
@ -96,29 +146,29 @@
},
{
"type": "ExportSpecifier",
"start": 13,
"end": 16,
"start": 22,
"end": 25,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 13
},
"end": {
"line": 1,
"line": 2,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 13,
"end": 16,
"start": 22,
"end": 25,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 13
},
"end": {
"line": 1,
"line": 2,
"column": 16
},
"identifierName": "bar"
@ -127,15 +177,15 @@
},
"exported": {
"type": "Identifier",
"start": 13,
"end": 16,
"start": 22,
"end": 25,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 13
},
"end": {
"line": 1,
"line": 2,
"column": 16
},
"identifierName": "bar"
@ -144,7 +194,59 @@
}
}
],
"source": null
"source": null,
"declaration": null
},
{
"type": "VariableDeclaration",
"start": 28,
"end": 36,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 8
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 32,
"end": 35,
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 32,
"end": 35,
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 7
},
"identifierName": "bar"
},
"name": "bar"
},
"init": null
}
],
"kind": "var"
}
],
"directives": []

View File

@ -1 +1,2 @@
declare module "foo" { declare export {a,}; }
var a;

View File

@ -1,29 +1,29 @@
{
"type": "File",
"start": 0,
"end": 45,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 45
"line": 2,
"column": 6
}
},
"program": {
"type": "Program",
"start": 0,
"end": 45,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 45
"line": 2,
"column": 6
}
},
"sourceType": "module",
@ -92,7 +92,6 @@
"column": 43
}
},
"declaration": null,
"specifiers": [
{
"type": "ExportSpecifier",
@ -145,11 +144,63 @@
}
],
"source": null,
"declaration": null,
"default": false
}
]
},
"kind": "ES"
},
{
"type": "VariableDeclaration",
"start": 46,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 6
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 50,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 50,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 5
},
"identifierName": "a"
},
"name": "a"
},
"init": null
}
],
"kind": "var"
}
],
"directives": []

View File

@ -1 +1,2 @@
let foo;
export type { foo };

View File

@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 20,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 20
}
},
"program": {
"type": "Program",
"start": 0,
"end": 20,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"line": 2,
"column": 20
}
},
@ -30,9 +30,9 @@
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"type": "VariableDeclaration",
"start": 0,
"end": 20,
"end": 8,
"loc": {
"start": {
"line": 1,
@ -40,35 +40,86 @@
},
"end": {
"line": 1,
"column": 8
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"id": {
"type": "Identifier",
"start": 4,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
},
"identifierName": "foo"
},
"name": "foo"
},
"init": null
}
],
"kind": "let"
},
{
"type": "ExportNamedDeclaration",
"start": 9,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 20
}
},
"specifiers": [
{
"type": "ExportSpecifier",
"start": 14,
"end": 17,
"start": 23,
"end": 26,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 14
},
"end": {
"line": 1,
"line": 2,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 14,
"end": 17,
"start": 23,
"end": 26,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 14
},
"end": {
"line": 1,
"line": 2,
"column": 17
},
"identifierName": "foo"
@ -77,15 +128,15 @@
},
"exported": {
"type": "Identifier",
"start": 14,
"end": 17,
"start": 23,
"end": 26,
"loc": {
"start": {
"line": 1,
"line": 2,
"column": 14
},
"end": {
"line": 1,
"line": 2,
"column": 17
},
"identifierName": "foo"

View File

@ -99,7 +99,7 @@ import type { imp2, imp3 } from "baz";
import type { foo as imp4 } from "baz";
import type from "foo";
import typeof * as namespace from "bar";
export type { foo };
export type { foo1 };
export type { foo2 } from "bar";
import {type T} from "foo";
import {type T2, V1} from "foo";

View File

@ -1 +1,2 @@
export {foo, bar};
var foo, bar;

View File

@ -1,12 +1,15 @@
System.register([], function (_export, _context) {
"use strict";
var foo, bar;
_export({
foo: void 0,
bar: void 0
});
return {
setters: [],
execute: function () {
_export("foo", foo);
_export("bar", bar);
}
execute: function () {}
};
});

View File

@ -1 +1,2 @@
export {foo as bar};
var foo;

View File

@ -1,10 +1,12 @@
System.register([], function (_export, _context) {
"use strict";
var foo;
_export("foo", void 0);
return {
setters: [],
execute: function () {
_export("bar", foo);
}
execute: function () {}
};
});

View File

@ -1 +1,2 @@
export {foo as default};
var foo;

View File

@ -1,10 +1,12 @@
System.register([], function (_export, _context) {
"use strict";
var foo;
_export("foo", void 0);
return {
setters: [],
execute: function () {
_export("default", foo);
}
execute: function () {}
};
});

View File

@ -1 +1,2 @@
export {foo as default, bar};
var foo, bar;

View File

@ -1,12 +1,15 @@
System.register([], function (_export, _context) {
"use strict";
var foo, bar;
_export({
foo: void 0,
bar: void 0
});
return {
setters: [],
execute: function () {
_export("default", foo);
_export("bar", bar);
}
execute: function () {}
};
});

View File

@ -1,10 +1,12 @@
System.register([], function (_export, _context) {
"use strict";
var foo;
_export("foo", void 0);
return {
setters: [],
execute: function () {
_export("foo", foo);
}
execute: function () {}
};
});

View File

@ -6,7 +6,7 @@ import * as foo2 from "foo";
import {bar} from "foo";
import {foo as bar2} from "foo";
export {test};
export {foo};
export var test2 = 5;
export default test;
export default foo;

View File

@ -10,11 +10,11 @@ System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export, _c
bar2 = _foo.foo;
}, function (_fooBar) {}, function (_directoryFooBar) {}],
execute: function () {
_export("test", test);
_export("foo", foo);
_export("test2", test2 = 5);
_export("default", test);
_export("default", foo);
}
};
});

View File

@ -35,3 +35,6 @@ numbers/underscored_float_whole.js
numbers/underscored_hex.js
numbers/underscored_number.js
numbers/underscored_oct.js
ES6/modules/migrated_0020.js
export_import_reserved_words/migrated_0003.js
export_statements/export_trailing_comma.js

View File

@ -600,10 +600,6 @@ language/literals/string/unicode-escape-nls-err-double.js(default)
language/literals/string/unicode-escape-nls-err-double.js(strict mode)
language/literals/string/unicode-escape-nls-err-single.js(default)
language/literals/string/unicode-escape-nls-err-single.js(strict mode)
language/module-code/early-export-global.js(default)
language/module-code/early-export-global.js(strict mode)
language/module-code/early-export-unresolvable.js(default)
language/module-code/early-export-unresolvable.js(strict mode)
language/module-code/privatename-not-valid-earlyerr-module-1.js(default)
language/module-code/privatename-not-valid-earlyerr-module-1.js(strict mode)
language/module-code/privatename-not-valid-earlyerr-module-2.js(default)