wuchale 0.23.2 → 0.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -86,6 +86,7 @@ export declare class Transformer {
|
|
|
86
86
|
visitTryStatement: (node: Estree.TryStatement) => Message[];
|
|
87
87
|
visitTSAsExpression: (node: Estree.TSAsExpression) => Message[];
|
|
88
88
|
visitTSTypeAssertion: (node: Estree.TSTypeAssertion) => Message[];
|
|
89
|
+
visitTSSatisfiesExpression: (node: Estree.TSSatisfiesExpression) => Message[];
|
|
89
90
|
visitProgram: (node: Estree.Program) => Message[];
|
|
90
91
|
visitWithCommentDirectives: (node: Estree.AnyNode, func: () => Message[]) => Message[];
|
|
91
92
|
visitEmptyStatement: () => Message[];
|
|
@@ -441,7 +441,12 @@ export class Transformer {
|
|
|
441
441
|
// for e.g. svelte to surrounded with $derived
|
|
442
442
|
visitVariableDeclarator = this.defaultVisitVariableDeclarator;
|
|
443
443
|
visitVariableDeclaration = (node) => node.declarations.flatMap(this.visitVariableDeclarator);
|
|
444
|
-
visitExportNamedDeclaration = (node) =>
|
|
444
|
+
visitExportNamedDeclaration = (node) => {
|
|
445
|
+
this.heuristciDetails.exported = true;
|
|
446
|
+
const msgs = node.declaration ? this.visit(node.declaration) : [];
|
|
447
|
+
delete this.heuristciDetails.exported;
|
|
448
|
+
return msgs;
|
|
449
|
+
};
|
|
445
450
|
visitExportDefaultDeclaration = this.visitExportNamedDeclaration;
|
|
446
451
|
visitStatementsNSaveRealBodyStart = (nodes) => {
|
|
447
452
|
const msgs = [];
|
|
@@ -678,6 +683,7 @@ export class Transformer {
|
|
|
678
683
|
};
|
|
679
684
|
visitTSAsExpression = (node) => this.visit(node.expression);
|
|
680
685
|
visitTSTypeAssertion = (node) => this.visit(node.expression);
|
|
686
|
+
visitTSSatisfiesExpression = (node) => this.visit(node.expression);
|
|
681
687
|
visitProgram = (node) => {
|
|
682
688
|
this.heuristciDetails.insideProgram = true;
|
|
683
689
|
const msgs = this.visitStatementsNSaveRealBodyStart(node.body);
|
package/dist/adapters.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export type HeuristicDetails = HeuristicDetailsBase & {
|
|
|
22
22
|
topLevelCall?: string | undefined;
|
|
23
23
|
/** the name of the nearest call (for arguments) */
|
|
24
24
|
call?: string | undefined;
|
|
25
|
+
/** inside an export const ... etc */
|
|
26
|
+
exported?: boolean | undefined;
|
|
25
27
|
};
|
|
26
28
|
export type MessageType = 'message' | 'url';
|
|
27
29
|
export type Message = {
|