@tsrx/core 0.1.24 → 0.1.25
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/package.json +1 -1
- package/src/plugin.js +42 -1
- package/src/transform/jsx/index.js +730 -1850
- package/types/index.d.ts +0 -2
- package/types/jsx-platform.d.ts +3 -8
package/types/index.d.ts
CHANGED
|
@@ -118,7 +118,6 @@ interface BaseNodeMetaData {
|
|
|
118
118
|
interface FunctionMetaData extends BaseNodeMetaData {
|
|
119
119
|
native_tsrx?: boolean;
|
|
120
120
|
native_tsrx_function?: boolean;
|
|
121
|
-
hook_split?: boolean;
|
|
122
121
|
is_method?: boolean;
|
|
123
122
|
tracked?: boolean;
|
|
124
123
|
has_lazy_descendants?: boolean;
|
|
@@ -183,7 +182,6 @@ declare module 'estree' {
|
|
|
183
182
|
|
|
184
183
|
interface BlockStatement {
|
|
185
184
|
metadata: BaseNodeMetaData & {
|
|
186
|
-
hook_split_block?: boolean;
|
|
187
185
|
native_return_block?: boolean;
|
|
188
186
|
native_tsrx_template_block?: boolean;
|
|
189
187
|
allows_native_return?: boolean;
|
package/types/jsx-platform.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export interface JsxTransformOptions {
|
|
|
102
102
|
comments?: AST.CommentWithLocation[];
|
|
103
103
|
/**
|
|
104
104
|
* Override whether hook-isolation helper components are emitted directly at
|
|
105
|
-
* module scope.
|
|
105
|
+
* module scope. Some runtime targets enable this, while editor tooling
|
|
106
106
|
* can disable it to preserve lexical `typeof` helper prop types.
|
|
107
107
|
*/
|
|
108
108
|
moduleScopedHookComponents?: boolean;
|
|
@@ -160,15 +160,10 @@ export interface JsxPlatformHooks {
|
|
|
160
160
|
/**
|
|
161
161
|
* Emit hook-isolation helper components as unique module-scope declarations
|
|
162
162
|
* instead of lazily creating and caching them from the parent component body.
|
|
163
|
-
*
|
|
164
|
-
*
|
|
163
|
+
* Targets that use compiler-generated branch helpers enable this so helper
|
|
164
|
+
* declarations are shared across renders.
|
|
165
165
|
*/
|
|
166
166
|
moduleScopedHookComponents?: boolean;
|
|
167
|
-
/**
|
|
168
|
-
* Split ordinary uppercase function component bodies when an early
|
|
169
|
-
* conditional return would make later React/Preact hooks conditional.
|
|
170
|
-
*/
|
|
171
|
-
componentBodyHookHelpers?: boolean;
|
|
172
167
|
/**
|
|
173
168
|
* Inject module-level imports after the main walk. Default: import
|
|
174
169
|
* `Suspense` from `platform.imports.suspense` and `TsrxErrorBoundary`
|