11import type { File } from './files/file' ;
22import type { BindingKind } from './symbols/types' ;
33
4- export interface ImportSingle {
5- /** Whether this import is type-only. */
6- isTypeOnly : boolean ;
7- /** Import flavor. */
8- kind : BindingKind ;
9- /**
10- * The name this symbol will have locally in this file.
11- * This is where aliasing is applied:
12- *
13- * import { Foo as Foo$2 } from "./x"
14- *
15- * localName === "Foo$2"
16- */
17- localName : string ;
18- /** The exported name of the symbol in its source file. */
19- sourceName : string ;
20- }
21-
22- export interface ExportSingle {
4+ export interface ExportMember {
235 /**
246 * Name under which the symbol is exported in this file.
257 *
@@ -36,22 +18,40 @@ export interface ExportSingle {
3618 sourceName : string ;
3719}
3820
39- export type ExportGroup = Pick < ExportSingle , 'isTypeOnly' > & {
21+ export type ExportModule = Pick < ExportMember , 'isTypeOnly' > & {
4022 /** Whether this module can export all symbols: `export * from 'module'`. */
4123 canExportAll : boolean ;
42- /** List of symbol exported from this module. */
43- exports : Array < ExportSingle > ;
24+ /** Members exported from this module. */
25+ exports : Array < ExportMember > ;
4426 /** Source file. */
4527 from : File ;
4628 /** Namespace export: `export * as ns from 'module'`. Mutually exclusive with `exports`. */
4729 namespaceExport ?: string ;
4830} ;
4931
50- export type ImportGroup = Pick < ImportSingle , 'isTypeOnly' > & {
32+ export interface ImportMember {
33+ /** Whether this import is type-only. */
34+ isTypeOnly : boolean ;
35+ /** Import flavor. */
36+ kind : BindingKind ;
37+ /**
38+ * The name this symbol will have locally in this file.
39+ * This is where aliasing is applied:
40+ *
41+ * import { Foo as Foo$2 } from "./x"
42+ *
43+ * localName === "Foo$2"
44+ */
45+ localName : string ;
46+ /** The exported name of the symbol in its source file. */
47+ sourceName : string ;
48+ }
49+
50+ export type ImportModule = Pick < ImportMember , 'isTypeOnly' > & {
5151 /** Source file. */
5252 from : File ;
5353 /** List of symbols imported from this module. */
54- imports : Array < ImportSingle > ;
54+ imports : Array < ImportMember > ;
5555 /** Namespace import: `import * as name from 'module'`. Mutually exclusive with `imports`. */
5656 namespaceImport ?: string ;
5757} ;
0 commit comments