diff --git a/packages/types/index.ts b/packages/types/index.ts index 59f2e6e04ff2..e707ba5228b5 100644 --- a/packages/types/index.ts +++ b/packages/types/index.ts @@ -317,7 +317,7 @@ export interface TerserMangleOptions { reserved?: string[]; } -export interface TerserManglePropertiesOptions {} +export interface TerserManglePropertiesOptions { } /** * Programmatic options. @@ -596,7 +596,20 @@ export interface JscConfig { */ experimental?: { optimizeHygiene?: boolean; - keepImportAssertions?: boolean; + + /** + * Preserve `with` in imports and exports. + */ + keepImportAttributes?: boolean; + + + /** + * Use `assert` instead of `with` for imports and exports. + * This option only works when `keepImportAttributes` is `true`. + */ + emitAssertForImportAttributes?: boolean; + + /** * Specify the location where SWC stores its intermediate cache files. * Currently only transform plugin uses this. If not specified, SWC will @@ -1074,7 +1087,7 @@ export interface Output { map?: string; } -export interface MatchPattern {} +export interface MatchPattern { } // ------------------------------- // ---------- Ast nodes ---------- @@ -1306,7 +1319,7 @@ export type Expression = | OptionalChainingExpression | Invalid; -interface ExpressionBase extends Node, HasSpan {} +interface ExpressionBase extends Node, HasSpan { } export interface Identifier extends ExpressionBase { type: "Identifier"; diff --git a/packages/types/package.json b/packages/types/package.json index 8131a218c843..3d1fba3c5691 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@swc/types", - "version": "0.1.4", + "version": "0.1.5", "description": "Typings for the swc project.", "sideEffects": false, "scripts": {