| | |
| | | */ |
| | | readonly d: number; |
| | | /** |
| | | * If this import has an import assertion, this is the start value. |
| | | * If this import has an import attribute, this is the start value. |
| | | * Otherwise this is `-1`. |
| | | */ |
| | | readonly a: number; |
| | | /** |
| | | * Parsed import attributes as an array of [key, value] tuples. |
| | | * If this import has no attributes, this is `null`. |
| | | * |
| | | * @example |
| | | * const source = `import foo from 'bar' with { type: "json" }`; |
| | | * const [imports] = parse(source); |
| | | * imports[0].at; |
| | | * // Returns [['type', 'json']] |
| | | * |
| | | * @example |
| | | * const source = `import foo from 'bar' with { type: "json", integrity: "sha384-..." }`; |
| | | * const [imports] = parse(source); |
| | | * imports[0].at; |
| | | * // Returns [['type', 'json'], ['integrity', 'sha384-...']] |
| | | */ |
| | | readonly at: ReadonlyArray<readonly [string, string]> | null; |
| | | } |
| | | export interface ExportSpecifier { |
| | | /** |