esrap 1.4.4 → 1.4.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/handlers.js +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esrap",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "Parse in reverse",
5
5
  "repository": {
6
6
  "type": "git",
package/src/handlers.js CHANGED
@@ -605,6 +605,16 @@ function handle_type_annotation(node, state) {
605
605
  handle_type_annotation(node.indexType, state);
606
606
  state.commands.push(']');
607
607
  break;
608
+ case 'TSImportType':
609
+ state.commands.push('import(');
610
+ handle(node.argument, state);
611
+ state.commands.push(')');
612
+
613
+ if (node.qualifier) {
614
+ state.commands.push('.');
615
+ handle(node.qualifier, state);
616
+ }
617
+ break;
608
618
  default:
609
619
  throw new Error(`Not implemented type annotation ${node.type}`);
610
620
  }