ripple 0.2.94 → 0.2.95
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
CHANGED
|
@@ -301,6 +301,15 @@ const visitors = {
|
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
303
|
|
|
304
|
+
TSTypeReference(node, context) {
|
|
305
|
+
// bug in our acorn pasrer: it uses typeParameters instead of typeArguments
|
|
306
|
+
if (node.typeParameters) {
|
|
307
|
+
node.typeArguments = node.typeParameters;
|
|
308
|
+
delete node.typeParameters;
|
|
309
|
+
}
|
|
310
|
+
context.next();
|
|
311
|
+
},
|
|
312
|
+
|
|
304
313
|
IfStatement(node, context) {
|
|
305
314
|
if (!is_inside_component(context)) {
|
|
306
315
|
return context.next();
|
|
@@ -419,59 +419,7 @@ const visitors = {
|
|
|
419
419
|
delete declarator.id.typeAnnotation;
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
-
|
|
423
|
-
let expression;
|
|
424
|
-
|
|
425
|
-
if (context.state.to_ts) {
|
|
426
|
-
// TypeScript mode: lighter transformation
|
|
427
|
-
if (metadata.tracking && !metadata.await) {
|
|
428
|
-
expression = b.call(
|
|
429
|
-
'_$_.derived',
|
|
430
|
-
b.thunk(context.visit(declarator.init)),
|
|
431
|
-
b.id('__block'),
|
|
432
|
-
);
|
|
433
|
-
} else {
|
|
434
|
-
expression = b.call(
|
|
435
|
-
'_$_.tracked',
|
|
436
|
-
declarator.init === null ? undefined : context.visit(declarator.init),
|
|
437
|
-
b.id('__block'),
|
|
438
|
-
);
|
|
439
|
-
}
|
|
440
|
-
} else {
|
|
441
|
-
debugger;
|
|
442
|
-
// Runtime mode: full transformation
|
|
443
|
-
if (metadata.tracking && metadata.await) {
|
|
444
|
-
expression = b.call(
|
|
445
|
-
b.await(
|
|
446
|
-
b.call(
|
|
447
|
-
'_$_.resume_context',
|
|
448
|
-
b.call(
|
|
449
|
-
'_$_.async_computed',
|
|
450
|
-
b.thunk(context.visit(declarator.init), true),
|
|
451
|
-
b.id('__block'),
|
|
452
|
-
),
|
|
453
|
-
),
|
|
454
|
-
),
|
|
455
|
-
);
|
|
456
|
-
} else if (metadata.tracking && !metadata.await) {
|
|
457
|
-
expression = b.call(
|
|
458
|
-
'_$_.derived',
|
|
459
|
-
b.thunk(context.visit(declarator.init)),
|
|
460
|
-
b.id('__block'),
|
|
461
|
-
);
|
|
462
|
-
} else {
|
|
463
|
-
expression = b.call(
|
|
464
|
-
'_$_.tracked',
|
|
465
|
-
declarator.init === null ? undefined : context.visit(declarator.init),
|
|
466
|
-
b.id('__block'),
|
|
467
|
-
);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
declarations.push(b.declarator(declarator.id, expression));
|
|
472
|
-
} else {
|
|
473
|
-
declarations.push(context.visit(declarator));
|
|
474
|
-
}
|
|
422
|
+
declarations.push(context.visit(declarator));
|
|
475
423
|
} else {
|
|
476
424
|
if (!context.state.to_ts) {
|
|
477
425
|
delete declarator.id.typeAnnotation;
|