@tsrx/core 0.1.38 → 0.1.39
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/transform/jsx/helpers.js +10 -0
package/package.json
CHANGED
|
@@ -185,6 +185,16 @@ export function tsx_with_ts_locations() {
|
|
|
185
185
|
}
|
|
186
186
|
context.write('>');
|
|
187
187
|
},
|
|
188
|
+
// esrap's TSExpressionWithTypeArguments printer only emits `expression`,
|
|
189
|
+
// dropping interface heritage arguments such as the `<T>` in
|
|
190
|
+
// `interface Foo<T> extends Bar<T> {}`. Besides changing the declaration's
|
|
191
|
+
// semantics, that leaves segments.js unable to map the omitted node.
|
|
192
|
+
TSExpressionWithTypeArguments: (node, context) => {
|
|
193
|
+
context.visit(node.expression);
|
|
194
|
+
if (node.typeParameters) {
|
|
195
|
+
context.visit(node.typeParameters);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
188
198
|
TSModuleDeclaration: (node, context) => {
|
|
189
199
|
context.write(node.metadata?.module_keyword ?? 'module');
|
|
190
200
|
context.write(' ');
|