@stylexjs/babel-plugin 0.2.0-beta.20 → 0.2.0-beta.22
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/flow_modules/@babel/core/index.js.flow +3 -4
- package/flow_modules/@babel/parser/index.js.flow +5 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1878 -1144
- package/lib/utils/evaluate-path.d.ts +1 -1
- package/lib/utils/js-to-ast.d.ts +8 -2
- package/lib/utils/js-to-ast.js.flow +7 -1
- package/lib/utils/state-manager.d.ts +5 -4
- package/lib/utils/state-manager.js.flow +3 -2
- package/lib/visitors/imports.d.ts +2 -2
- package/lib/visitors/stylex-create/index.d.ts +2 -2
- package/lib/visitors/stylex-create/parse-stylex-create-arg.d.ts +2 -2
- package/lib/visitors/{stylex-create.d.ts → stylex-create-theme.d.ts} +5 -5
- package/lib/visitors/{stylex-create.js.flow → stylex-create-theme.js.flow} +6 -7
- package/lib/visitors/{stylex-create-vars.d.ts → stylex-define-vars.d.ts} +4 -4
- package/lib/visitors/{stylex-create-vars.js.flow → stylex-define-vars.js.flow} +4 -4
- package/lib/visitors/stylex-keyframes.d.ts +2 -2
- package/lib/visitors/stylex-merge.d.ts +2 -2
- package/lib/visitors/stylex-override-vars.d.ts +4 -4
- package/lib/visitors/stylex-override-vars.js.flow +4 -4
- package/lib/visitors/stylex-props.d.ts +21 -0
- package/lib/visitors/stylex-props.js.flow +25 -0
- package/package.json +2 -2
- package/lib/visitors/stylex-create/parse-style-function.d.ts +0 -18
- package/lib/visitors/stylex-create/parse-style-function.js.flow +0 -23
|
@@ -28,8 +28,7 @@ export { traverse, NodePath };
|
|
|
28
28
|
export type Visitor<S> = _Visitor<S>;
|
|
29
29
|
|
|
30
30
|
export type Node = t.Node;
|
|
31
|
-
export type ParseResult<Result:
|
|
32
|
-
_ParseResult<Result>;
|
|
31
|
+
export type ParseResult<Result: t.Node = t.Node> = _ParseResult<Result>;
|
|
33
32
|
declare export var version: string;
|
|
34
33
|
declare export var DEFAULT_EXTENSIONS: ['.js', '.jsx', '.es6', '.es', '.mjs'];
|
|
35
34
|
|
|
@@ -586,7 +585,7 @@ declare export var parse: ((
|
|
|
586
585
|
declare export function parseSync(
|
|
587
586
|
code: string,
|
|
588
587
|
options?: TransformOptions,
|
|
589
|
-
): ParseResult
|
|
588
|
+
): ParseResult<t.File> | null;
|
|
590
589
|
|
|
591
590
|
/**
|
|
592
591
|
* Given some code, parse it using Babel's standard behavior.
|
|
@@ -595,7 +594,7 @@ declare export function parseSync(
|
|
|
595
594
|
declare export function parseAsync(
|
|
596
595
|
code: string,
|
|
597
596
|
options?: TransformOptions,
|
|
598
|
-
): Promise<ParseResult
|
|
597
|
+
): Promise<ParseResult<t.File> | null>;
|
|
599
598
|
|
|
600
599
|
/**
|
|
601
600
|
* Resolve Babel's options fully, resulting in an options object where:
|
|
@@ -246,7 +246,8 @@ export type ParseError = {
|
|
|
246
246
|
reasonCode: string,
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
-
export type ParseResult<Result:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
export type ParseResult<Result: t.Node = t.Node> =
|
|
250
|
+
| Result
|
|
251
|
+
| {
|
|
252
|
+
+errors: $ReadOnlyArray<ParseError>,
|
|
253
|
+
};
|