@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.
@@ -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: { +[string]: mixed } = { +[string]: mixed }> =
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<> | null;
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<> | null>;
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: { +[string]: mixed }> = {
250
- ...Result,
251
- errors: ParseError[],
252
- };
249
+ export type ParseResult<Result: t.Node = t.Node> =
250
+ | Result
251
+ | {
252
+ +errors: $ReadOnlyArray<ParseError>,
253
+ };
package/lib/index.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  *
8
8
  */
9
9
 
10
- import type { PluginObj } from '@babel/core';
10
+ import type { PluginObj } from '../flow_modules/@babel/core';
11
11
  /**
12
12
  * Entry point for the StyleX babel plugin.
13
13
  */