fork of hey-api/openapi-ts because I need some additional things
at main 57 lines 1.7 kB view raw
1import type { File } from './files/file'; 2import type { BindingKind } from './symbols/types'; 3 4export interface ExportMember { 5 /** 6 * Name under which the symbol is exported in this file. 7 * 8 * export { Foo as Bar } from "./models" 9 * 10 * exportedName === "Bar" 11 */ 12 exportedName: string; 13 /** Whether this export is type-only. */ 14 isTypeOnly: boolean; 15 /** Export flavor. */ 16 kind: BindingKind; 17 /** The exported name of the symbol in its source file. */ 18 sourceName: string; 19} 20 21export type ExportModule = Pick<ExportMember, 'isTypeOnly'> & { 22 /** Whether this module can export all symbols: `export * from 'module'`. */ 23 canExportAll: boolean; 24 /** Members exported from this module. */ 25 exports: Array<ExportMember>; 26 /** Source file. */ 27 from: File; 28 /** Namespace export: `export * as ns from 'module'`. Mutually exclusive with `exports`. */ 29 namespaceExport?: string; 30}; 31 32export 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 50export type ImportModule = Pick<ImportMember, 'isTypeOnly'> & { 51 /** Source file. */ 52 from: File; 53 /** List of symbols imported from this module. */ 54 imports: Array<ImportMember>; 55 /** Namespace import: `import * as name from 'module'`. Mutually exclusive with `imports`. */ 56 namespaceImport?: string; 57};