babel-plugin-react-compiler 0.0.0-experimental-9e9cd66-20250520 → 0.0.0-experimental-f980e29-20250522
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.d.ts +11 -2
- package/dist/index.js +323 -216
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1548,10 +1548,19 @@ declare function compileFn(func: NodePath<t.FunctionDeclaration | t.ArrowFunctio
|
|
1548
1548
|
|
1549
1549
|
declare const PanicThresholdOptionsSchema: z.ZodEnum<["all_errors", "critical_errors", "none"]>;
|
1550
1550
|
type PanicThresholdOptions = z.infer<typeof PanicThresholdOptionsSchema>;
|
1551
|
+
declare const DynamicGatingOptionsSchema: z.ZodObject<{
|
1552
|
+
source: z.ZodString;
|
1553
|
+
}, "strip", z.ZodTypeAny, {
|
1554
|
+
source: string;
|
1555
|
+
}, {
|
1556
|
+
source: string;
|
1557
|
+
}>;
|
1558
|
+
type DynamicGatingOptions = z.infer<typeof DynamicGatingOptionsSchema>;
|
1551
1559
|
type PluginOptions = {
|
1552
1560
|
environment: EnvironmentConfig;
|
1553
1561
|
logger: Logger | null;
|
1554
1562
|
gating: ExternalFunction | null;
|
1563
|
+
dynamicGating: DynamicGatingOptions | null;
|
1555
1564
|
panicThreshold: PanicThresholdOptions;
|
1556
1565
|
noEmit: boolean;
|
1557
1566
|
compilationMode: CompilationMode;
|
@@ -1635,7 +1644,7 @@ type CompilerPass = {
|
|
1635
1644
|
};
|
1636
1645
|
declare const OPT_IN_DIRECTIVES: Set<string>;
|
1637
1646
|
declare const OPT_OUT_DIRECTIVES: Set<string>;
|
1638
|
-
declare function
|
1647
|
+
declare function tryFindDirectiveEnablingMemoization(directives: Array<t.Directive>, opts: PluginOptions): Result<t.Directive | null, CompilerError>;
|
1639
1648
|
declare function findDirectiveDisablingMemoization(directives: Array<t.Directive>): t.Directive | null;
|
1640
1649
|
type BabelFn = NodePath$1<t.FunctionDeclaration> | NodePath$1<t.FunctionExpression> | NodePath$1<t.ArrowFunctionExpression>;
|
1641
1650
|
type CompileProgramMetadata = {
|
@@ -1701,4 +1710,4 @@ declare global {
|
|
1701
1710
|
let __DEV__: boolean | null | undefined;
|
1702
1711
|
}
|
1703
1712
|
|
1704
|
-
export { CompilerError, CompilerErrorDetail, type CompilerErrorDetailOptions, type CompilerPipelineValue, CompilerSuggestionOperation, Effect, type EnvironmentConfig, ErrorSeverity, type ExternalFunction, type Hook, type Logger, type LoggerEvent, OPT_IN_DIRECTIVES, OPT_OUT_DIRECTIVES, type PluginOptions, ProgramContext, type SourceLocation, ValueKind, compileFn as compile, compileProgram, BabelPluginReactCompiler as default, findDirectiveDisablingMemoization, findDirectiveEnablingMemoization, parseConfigPragmaForTests, parsePluginOptions, printFunctionWithOutlined, printHIR, printReactiveFunction, printReactiveFunctionWithOutlined, runBabelPluginReactCompiler, validateEnvironmentConfig };
|
1713
|
+
export { CompilerError, CompilerErrorDetail, type CompilerErrorDetailOptions, type CompilerPipelineValue, CompilerSuggestionOperation, Effect, type EnvironmentConfig, ErrorSeverity, type ExternalFunction, type Hook, type Logger, type LoggerEvent, OPT_IN_DIRECTIVES, OPT_OUT_DIRECTIVES, type PluginOptions, ProgramContext, type SourceLocation, ValueKind, compileFn as compile, compileProgram, BabelPluginReactCompiler as default, findDirectiveDisablingMemoization, tryFindDirectiveEnablingMemoization as findDirectiveEnablingMemoization, parseConfigPragmaForTests, parsePluginOptions, printFunctionWithOutlined, printHIR, printReactiveFunction, printReactiveFunctionWithOutlined, runBabelPluginReactCompiler, validateEnvironmentConfig };
|