Skip to content

Commit eecaac1

Browse files
authored
fix(node/swc): Fix typings for parser options (#1971)
1 parent b02e189 commit eecaac1

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

node-swc/src/types.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ export interface EsParserConfig {
339339
privateMethod?: boolean;
340340
/**
341341
* Defaults to `false`
342+
*
343+
* @deprecated Always true because it's in ecmascript spec.
342344
*/
343345
classProperty?: boolean;
344346
/**
@@ -353,6 +355,16 @@ export interface EsParserConfig {
353355
* Defaults to `false`
354356
*/
355357
decoratorsBeforeExport?: boolean;
358+
/**
359+
* Defaults to `false`
360+
*/
361+
exportDefaultFrom?: boolean;
362+
/**
363+
* Defaults to `false`
364+
*
365+
* @deprecated Always true because it's in ecmascript spec.
366+
*/
367+
exportNamespaceFrom?: boolean;
356368
/**
357369
* Defaults to `false`
358370
*/
@@ -365,16 +377,22 @@ export interface EsParserConfig {
365377
nullishCoalescing?: boolean;
366378
/**
367379
* Defaults to `false`
380+
*
381+
* @deprecated Always true because it's in ecmascript spec.
368382
*/
369-
exportDefaultFrom?: boolean;
383+
optionalChaining?: boolean;
370384
/**
371385
* Defaults to `false`
372386
*/
373-
exportNamespaceFrom?: boolean;
387+
importMeta?: boolean;
374388
/**
375389
* Defaults to `false`
376390
*/
377-
importMeta?: boolean;
391+
topLevelAwait?: boolean;
392+
/**
393+
* Defaults to `false`
394+
*/
395+
importAssertions?: boolean;
378396
}
379397

380398
/**

0 commit comments

Comments
 (0)