@code-inspector/core 1.4.7 → 1.5.1
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.
- package/dist/index.js +4 -4
- package/dist/index.mjs +62588 -62026
- package/package.json +1 -1
- package/types/server/transform/transform-jsx.d.ts +33 -0
package/package.json
CHANGED
|
@@ -1,2 +1,35 @@
|
|
|
1
|
+
import MagicString from 'magic-string';
|
|
1
2
|
import { EscapeTags } from '../../shared';
|
|
3
|
+
type RootTarget = {
|
|
4
|
+
type: 'jsx';
|
|
5
|
+
node: any;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'createElement';
|
|
8
|
+
node: any;
|
|
9
|
+
};
|
|
2
10
|
export declare function transformJsx(content: string, filePath: string, escapeTags: EscapeTags): string;
|
|
11
|
+
declare function hasExportDefaultAncestor(path: any): boolean;
|
|
12
|
+
declare function getPropagatedPathExpression(path: any, s: MagicString, content: string): string;
|
|
13
|
+
declare function getObjectPatternPathBinding(param: any): string;
|
|
14
|
+
declare function getObjectPropertyName(node: any): string;
|
|
15
|
+
declare function getEmptyParamsInsertPosition(node: any, content: string): any;
|
|
16
|
+
declare function collectRootTargets(node: any, scope: any, visitedBindings?: Set<string>): RootTarget[];
|
|
17
|
+
declare function shouldPropagatePathToExpression(node: any, scope: any, visitedBindings?: Set<string>): boolean;
|
|
18
|
+
declare function estimateRootCount(node: any, scope: any, visitedBindings: Set<string>): number;
|
|
19
|
+
export declare function injectCreateElementPath(node: any, s: MagicString, content: string, pathExpression: string): void;
|
|
20
|
+
export declare function getJsxNodeName(node: any): string;
|
|
21
|
+
export declare function getCallExpressionName(node: any): string;
|
|
22
|
+
export declare function getExpressionName(node: any): string;
|
|
23
|
+
declare function isEscapedJsxTag(escapeTags: EscapeTags, nodeName: string): boolean;
|
|
24
|
+
export declare const __TEST__: {
|
|
25
|
+
hasExportDefaultAncestor: typeof hasExportDefaultAncestor;
|
|
26
|
+
getPropagatedPathExpression: typeof getPropagatedPathExpression;
|
|
27
|
+
getObjectPatternPathBinding: typeof getObjectPatternPathBinding;
|
|
28
|
+
getObjectPropertyName: typeof getObjectPropertyName;
|
|
29
|
+
getEmptyParamsInsertPosition: typeof getEmptyParamsInsertPosition;
|
|
30
|
+
shouldPropagatePathToExpression: typeof shouldPropagatePathToExpression;
|
|
31
|
+
estimateRootCount: typeof estimateRootCount;
|
|
32
|
+
collectRootTargets: typeof collectRootTargets;
|
|
33
|
+
isEscapedJsxTag: typeof isEscapedJsxTag;
|
|
34
|
+
};
|
|
35
|
+
export {};
|