@@ -25,17 +25,19 @@ export interface ExportStatement extends ts.ExpressionStatement {
25
25
}
26
26
27
27
/**
28
- * A CommonJS or UMD re-export statement.
28
+ * A CommonJS or UMD wildcard re-export statement.
29
29
*
30
- * In CommonJS/UMD, re-export statements can have several forms (depending, for example, on whether
30
+ * The CommonJS or UMD version of `export * from 'blah';`.
31
+ *
32
+ * These statements can have several forms (depending, for example, on whether
31
33
* the TypeScript helpers are imported or emitted inline). The expression can have one of the
32
34
* following forms:
33
35
* - `__export(firstArg)`
34
36
* - `__exportStar(firstArg)`
35
37
* - `tslib.__export(firstArg, exports)`
36
38
* - `tslib.__exportStar(firstArg, exports)`
37
39
*
38
- * In all cases, we only care about `firstApp `, which is the first argument of the re-export call
40
+ * In all cases, we only care about `firstArg `, which is the first argument of the re-export call
39
41
* expression and can be either a `require('...')` call or an identifier (initialized via a
40
42
* `require('...')` call).
41
43
*/
@@ -76,7 +78,7 @@ export function findRequireCallReference(id: ts.Identifier, checker: ts.TypeChec
76
78
77
79
/**
78
80
* Check whether the specified `ts.Statement` is an export statement, i.e. an expression statement
79
- * of the form: `export .<foo> = <bar>`
81
+ * of the form: `exports .<foo> = <bar>`
80
82
*/
81
83
export function isExportStatement ( stmt : ts . Statement ) : stmt is ExportStatement {
82
84
return ts . isExpressionStatement ( stmt ) && ts . isBinaryExpression ( stmt . expression ) &&
@@ -87,8 +89,8 @@ export function isExportStatement(stmt: ts.Statement): stmt is ExportStatement {
87
89
}
88
90
89
91
/**
90
- * Check whether the specified `ts.Statement` is a re-export statement, i.e. an expression statement
91
- * of one of the following forms:
92
+ * Check whether the specified `ts.Statement` is a wildcard re-export statement.
93
+ * I.E. an expression statement of one of the following forms:
92
94
* - `__export(<foo>)`
93
95
* - `__exportStar(<foo>)`
94
96
* - `tslib.__export(<foo>, exports)`
0 commit comments