@marko/compiler 5.20.8 → 5.21.1

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 (96) hide show
  1. package/dist/babel-plugin/file.js +1 -2
  2. package/dist/babel-plugin/index.js +1 -9
  3. package/dist/babel-plugin/parser.js +389 -277
  4. package/dist/babel-plugin/plugins/migrate.js +1 -2
  5. package/dist/babel-plugin/plugins/transform.js +1 -2
  6. package/dist/babel-plugin/util/plugin-hooks.js +1 -2
  7. package/dist/babel-types/generator/patch.js +1 -2
  8. package/dist/babel-types/index.js +1 -2
  9. package/dist/babel-types/traverse/patch.js +1 -2
  10. package/dist/babel-types/types/definitions.js +1 -2
  11. package/dist/babel-types/types/patch.js +1 -2
  12. package/dist/config.js +1 -2
  13. package/dist/index.js +1 -2
  14. package/dist/register.js +1 -2
  15. package/dist/taglib/finder/index.js +1 -2
  16. package/dist/taglib/fs.js +1 -2
  17. package/dist/taglib/index.js +1 -2
  18. package/dist/taglib/loader/Attribute.js +1 -2
  19. package/dist/taglib/loader/DependencyChain.js +1 -2
  20. package/dist/taglib/loader/Property.js +1 -2
  21. package/dist/taglib/loader/Tag.js +1 -2
  22. package/dist/taglib/loader/Taglib.js +1 -2
  23. package/dist/taglib/loader/Transformer.js +1 -2
  24. package/dist/taglib/loader/cache.js +1 -2
  25. package/dist/taglib/loader/index.js +1 -2
  26. package/dist/taglib/loader/json-file-reader.js +1 -2
  27. package/dist/taglib/loader/loadAttributeFromProps.js +1 -2
  28. package/dist/taglib/loader/loadAttributes.js +1 -2
  29. package/dist/taglib/loader/loadTagFromFile.js +1 -2
  30. package/dist/taglib/loader/loadTagFromProps.js +1 -2
  31. package/dist/taglib/loader/loadTaglibFromFile.js +1 -2
  32. package/dist/taglib/loader/loadTaglibFromProps.js +1 -2
  33. package/dist/taglib/loader/loaders.js +1 -2
  34. package/dist/taglib/loader/scanTagsDir.js +1 -2
  35. package/dist/taglib/loader/tag-def-from-code.js +1 -2
  36. package/dist/taglib/loader/types.js +1 -2
  37. package/dist/taglib/lookup/index.js +1 -2
  38. package/dist/taglib/marko-html.json +3 -0
  39. package/dist/traverse.d.ts +16 -9
  40. package/dist/types.d.ts +30 -5
  41. package/dist/util/should-optimize.js +1 -2
  42. package/dist/util/try-load-translator.js +1 -2
  43. package/index.d.ts +16 -8
  44. package/package.json +5 -6
  45. package/LICENSE +0 -21
  46. package/dist/babel-plugin/file.js.map +0 -1
  47. package/dist/babel-plugin/index.js.map +0 -1
  48. package/dist/babel-plugin/parser.js.map +0 -1
  49. package/dist/babel-plugin/plugins/migrate.js.map +0 -1
  50. package/dist/babel-plugin/plugins/transform.js.map +0 -1
  51. package/dist/babel-plugin/util/parse-arguments.js +0 -15
  52. package/dist/babel-plugin/util/parse-arguments.js.map +0 -1
  53. package/dist/babel-plugin/util/parse-attributes.js +0 -89
  54. package/dist/babel-plugin/util/parse-attributes.js.map +0 -1
  55. package/dist/babel-plugin/util/parse-classname-shorthand.js +0 -65
  56. package/dist/babel-plugin/util/parse-classname-shorthand.js.map +0 -1
  57. package/dist/babel-plugin/util/parse-id-shorthand.js +0 -34
  58. package/dist/babel-plugin/util/parse-id-shorthand.js.map +0 -1
  59. package/dist/babel-plugin/util/parse-params.js +0 -10
  60. package/dist/babel-plugin/util/parse-params.js.map +0 -1
  61. package/dist/babel-plugin/util/parse-var.js +0 -8
  62. package/dist/babel-plugin/util/parse-var.js.map +0 -1
  63. package/dist/babel-plugin/util/plugin-hooks.js.map +0 -1
  64. package/dist/babel-types/generator/patch.js.map +0 -1
  65. package/dist/babel-types/index.js.map +0 -1
  66. package/dist/babel-types/traverse/patch.js.map +0 -1
  67. package/dist/babel-types/types/definitions.js.map +0 -1
  68. package/dist/babel-types/types/patch.js.map +0 -1
  69. package/dist/config.js.map +0 -1
  70. package/dist/index.js.map +0 -1
  71. package/dist/register.js.map +0 -1
  72. package/dist/taglib/finder/index.js.map +0 -1
  73. package/dist/taglib/fs.js.map +0 -1
  74. package/dist/taglib/index.js.map +0 -1
  75. package/dist/taglib/loader/Attribute.js.map +0 -1
  76. package/dist/taglib/loader/DependencyChain.js.map +0 -1
  77. package/dist/taglib/loader/Property.js.map +0 -1
  78. package/dist/taglib/loader/Tag.js.map +0 -1
  79. package/dist/taglib/loader/Taglib.js.map +0 -1
  80. package/dist/taglib/loader/Transformer.js.map +0 -1
  81. package/dist/taglib/loader/cache.js.map +0 -1
  82. package/dist/taglib/loader/index.js.map +0 -1
  83. package/dist/taglib/loader/json-file-reader.js.map +0 -1
  84. package/dist/taglib/loader/loadAttributeFromProps.js.map +0 -1
  85. package/dist/taglib/loader/loadAttributes.js.map +0 -1
  86. package/dist/taglib/loader/loadTagFromFile.js.map +0 -1
  87. package/dist/taglib/loader/loadTagFromProps.js.map +0 -1
  88. package/dist/taglib/loader/loadTaglibFromFile.js.map +0 -1
  89. package/dist/taglib/loader/loadTaglibFromProps.js.map +0 -1
  90. package/dist/taglib/loader/loaders.js.map +0 -1
  91. package/dist/taglib/loader/scanTagsDir.js.map +0 -1
  92. package/dist/taglib/loader/tag-def-from-code.js.map +0 -1
  93. package/dist/taglib/loader/types.js.map +0 -1
  94. package/dist/taglib/lookup/index.js.map +0 -1
  95. package/dist/util/should-optimize.js.map +0 -1
  96. package/dist/util/try-load-translator.js.map +0 -1
@@ -58,5 +58,4 @@ function getMigratorsForTag(path) {
58
58
  }
59
59
 
60
60
  return migrators;
61
- }
62
- //# sourceMappingURL=migrate.js.map
61
+ }
@@ -60,5 +60,4 @@ function getTransformersForTag(path) {
60
60
  }
61
61
 
62
62
  return transformers;
63
- }
64
- //# sourceMappingURL=transform.js.map
63
+ }
@@ -19,5 +19,4 @@ function exit(plugin, ...args) {
19
19
  if (typeof fn === "function") {
20
20
  fn(...args);
21
21
  }
22
- }
23
- //# sourceMappingURL=plugin-hooks.js.map
22
+ }
@@ -236,5 +236,4 @@ function printWithParansIfNeeded(value, parent) {
236
236
 
237
237
  function hasUnenclosedWhitespace(node) {
238
238
  return UNENCLOSED_WHITESPACE_TYPES.includes(node.type);
239
- }
240
- //# sourceMappingURL=patch.js.map
239
+ }
@@ -2,5 +2,4 @@
2
2
  require("./traverse/patch");
3
3
  require("./generator/patch");
4
4
  var _types = require("@babel/types");Object.keys(_types).forEach(function (key) {if (key === "default" || key === "__esModule") return;if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;if (key in exports && exports[key] === _types[key]) return;exports[key] = _types[key];});
5
- var _definitions = require("./types/definitions");exports.MARKO_TYPES = _definitions.MARKO_TYPES;
6
- //# sourceMappingURL=index.js.map
5
+ var _definitions = require("./types/definitions");exports.MARKO_TYPES = _definitions.MARKO_TYPES;
@@ -125,5 +125,4 @@ function getScopeDepth(scope) {
125
125
  let cur = scope;
126
126
  while (cur = cur.parent) depth++;
127
127
  return depth;
128
- }
129
- //# sourceMappingURL=patch.js.map
128
+ }
@@ -190,5 +190,4 @@ MarkoDefinitions;exports.default = _default;
190
190
  const MARKO_TYPES = Object.keys(MarkoDefinitions);exports.MARKO_TYPES = MARKO_TYPES;
191
191
  const MARKO_ALIAS_TYPES = Array.from(
192
192
  new Set(
193
- MARKO_TYPES.reduce((all, t) => all.concat(MarkoDefinitions[t].aliases), [])));exports.MARKO_ALIAS_TYPES = MARKO_ALIAS_TYPES;
194
- //# sourceMappingURL=definitions.js.map
193
+ MARKO_TYPES.reduce((all, t) => all.concat(MarkoDefinitions[t].aliases), [])));exports.MARKO_ALIAS_TYPES = MARKO_ALIAS_TYPES;
@@ -68,5 +68,4 @@ function assert(typeName, node, opts) {
68
68
  }, but instead got "${node.type}".`);
69
69
 
70
70
  }
71
- }
72
- //# sourceMappingURL=patch.js.map
71
+ }
package/dist/config.js CHANGED
@@ -195,5 +195,4 @@ var _fs2 = require("./taglib/fs");let config;const globalThis = typeof window ==
195
195
  * A regexp or function that receives an import path that matches file types known to be client side assets.
196
196
  */hydrateIncludeImports: /\.(css|less|s[ac]ss|styl|png|jpe?g|gif|svg|ico|webp|avif|mp4|webm|ogg|mp3|wav|flac|aac|woff2?|eot|ttf|otf)$/, /**
197
197
  * Set to true in order to bring in the hot module replacement runtime.
198
- */hot: false };if (process.env.MARKO_CONFIG) {Object.assign(config, JSON.parse(process.env.MARKO_CONFIG));}}var _default = config;exports.default = _default;(0, _fs2.setFS)(config.fileSystem);
199
- //# sourceMappingURL=config.js.map
198
+ */hot: false };if (process.env.MARKO_CONFIG) {Object.assign(config, JSON.parse(process.env.MARKO_CONFIG));}}var _default = config;exports.default = _default;(0, _fs2.setFS)(config.fileSystem);
package/dist/index.js CHANGED
@@ -114,5 +114,4 @@ function isDefaultCache(config) {
114
114
 
115
115
  function getFs(config) {
116
116
  return config.fileSystem || globalConfig.fileSystem;
117
- }
118
- //# sourceMappingURL=index.js.map
117
+ }
package/dist/register.js CHANGED
@@ -21,5 +21,4 @@ function register({ extensions = require.extensions, ...options } = {}) {
21
21
  filename);
22
22
 
23
23
  return extensions;
24
- }
25
- //# sourceMappingURL=register.js.map
24
+ }
@@ -178,5 +178,4 @@ exports.reset = reset;
178
178
  exports.find = find;
179
179
  exports.clearCache = clearCache;
180
180
  exports.excludeDir = excludeDir;
181
- exports.excludePackage = excludePackage;
182
- //# sourceMappingURL=index.js.map
181
+ exports.excludePackage = excludePackage;
package/dist/taglib/fs.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use strict";exports.__esModule = true;exports.curFS = void 0;exports.setFS = setFS;let curFS;exports.curFS = curFS;
2
2
  function setFS(fs) {
3
3
  exports.curFS = curFS = fs;
4
- }
5
- //# sourceMappingURL=fs.js.map
4
+ }
@@ -75,5 +75,4 @@ const _finder = _finder2.default;exports._finder = _finder;
75
75
 
76
76
  function loadTaglib(id, props) {
77
77
  return _loader2.default.loadTaglibFromProps(_loader2.default.createTaglib(id), props);
78
- }
79
- //# sourceMappingURL=index.js.map
78
+ }
@@ -12,5 +12,4 @@ class Attribute {
12
12
  }}
13
13
 
14
14
 
15
- module.exports = Attribute;
16
- //# sourceMappingURL=Attribute.js.map
15
+ module.exports = Attribute;
@@ -14,5 +14,4 @@ class DependencyChain {
14
14
  }}
15
15
 
16
16
 
17
- module.exports = DependencyChain;
18
- //# sourceMappingURL=DependencyChain.js.map
17
+ module.exports = DependencyChain;
@@ -8,5 +8,4 @@ class Property {
8
8
  }}
9
9
 
10
10
 
11
- module.exports = Property;
12
- //# sourceMappingURL=Property.js.map
11
+ module.exports = Property;
@@ -97,5 +97,4 @@ class Tag {
97
97
  }}
98
98
 
99
99
 
100
- module.exports = Tag;
101
- //# sourceMappingURL=Tag.js.map
100
+ module.exports = Tag;
@@ -89,5 +89,4 @@ class Taglib {
89
89
  }}
90
90
 
91
91
 
92
- module.exports = Taglib;
93
- //# sourceMappingURL=Taglib.js.map
92
+ module.exports = Taglib;
@@ -15,5 +15,4 @@ class Transformer {
15
15
  }}
16
16
 
17
17
 
18
- module.exports = Transformer;
19
- //# sourceMappingURL=Transformer.js.map
18
+ module.exports = Transformer;
@@ -14,5 +14,4 @@ function clear() {
14
14
 
15
15
  exports.get = get;
16
16
  exports.put = put;
17
- exports.clear = clear;
18
- //# sourceMappingURL=cache.js.map
17
+ exports.clear = clear;
@@ -34,5 +34,4 @@ exports.clearCache = clearCache;
34
34
  exports.createTaglib = createTaglib;
35
35
  exports.loadTaglibFromProps = loadTaglibFromProps;
36
36
  exports.loadTaglibFromFile = loadTaglibFromFile;
37
- exports.loadTag = loadTag;
38
- //# sourceMappingURL=index.js.map
37
+ exports.loadTag = loadTag;
@@ -13,5 +13,4 @@ exports.readFileSync = function (path) {
13
13
  'Unable to parse JSON file at path "' + path + '". Error: ' + e);
14
14
 
15
15
  }
16
- };
17
- //# sourceMappingURL=json-file-reader.js.map
16
+ };
@@ -240,5 +240,4 @@ loadAttributeFromProps.isSupportedProperty = function (name) {
240
240
  return hasOwnProperty.call(AttrLoader.prototype, name);
241
241
  };
242
242
 
243
- module.exports = loadAttributeFromProps;
244
- //# sourceMappingURL=loadAttributeFromProps.js.map
243
+ module.exports = loadAttributeFromProps;
@@ -15,5 +15,4 @@ module.exports = function loadAttributes(value, parent, dependencyChain) {
15
15
 
16
16
  parent.addAttribute(attr);
17
17
  }
18
- };
19
- //# sourceMappingURL=loadAttributes.js.map
18
+ };
@@ -23,5 +23,4 @@ function loadTagFromFile(filePath) {
23
23
  return tag;
24
24
  }
25
25
 
26
- module.exports = loadTagFromFile;
27
- //# sourceMappingURL=loadTagFromFile.js.map
26
+ module.exports = loadTagFromFile;
@@ -555,5 +555,4 @@ function loadTagFromProps(tag, tagProps, dependencyChain) {
555
555
 
556
556
  module.exports = loadTagFromProps;
557
557
 
558
- loadTagFromProps.isSupportedProperty = isSupportedProperty;
559
- //# sourceMappingURL=loadTagFromProps.js.map
558
+ loadTagFromProps.isSupportedProperty = isSupportedProperty;
@@ -23,5 +23,4 @@ function loadFromFile(filePath) {
23
23
  return taglib;
24
24
  }
25
25
 
26
- module.exports = loadFromFile;
27
- //# sourceMappingURL=loadTaglibFromFile.js.map
26
+ module.exports = loadFromFile;
@@ -407,5 +407,4 @@ function loadTaglibFromProps(taglib, taglibProps, dependencyChain) {
407
407
  return taglib;
408
408
  }
409
409
 
410
- module.exports = loadTaglibFromProps;
411
- //# sourceMappingURL=loadTaglibFromProps.js.map
410
+ module.exports = loadTaglibFromProps;
@@ -20,5 +20,4 @@ exports.loadTaglibFromProps = require("./loadTaglibFromProps");
20
20
  exports.loadTaglibFromFile = require("./loadTaglibFromFile");
21
21
  exports.loadAttributes = require("./loadAttributes");
22
22
  exports.isSupportedAttributeProperty = isSupportedAttributeProperty;
23
- exports.isSupportedTagProperty = isSupportedTagProperty;
24
- //# sourceMappingURL=loaders.js.map
23
+ exports.isSupportedTagProperty = isSupportedTagProperty;
@@ -216,5 +216,4 @@ dependencyChain)
216
216
  tag.name = tag.name || tagName;
217
217
  taglib.addTag(tag);
218
218
  }
219
- };
220
- //# sourceMappingURL=scanTagsDir.js.map
219
+ };
@@ -55,5 +55,4 @@ function extractTagDef(code) {
55
55
  }
56
56
  }
57
57
 
58
- exports.extractTagDef = extractTagDef;
59
- //# sourceMappingURL=tag-def-from-code.js.map
58
+ exports.extractTagDef = extractTagDef;
@@ -2,5 +2,4 @@
2
2
  exports.Tag = require("./Tag");
3
3
  exports.Attribute = require("./Attribute");
4
4
  exports.Property = require("./Property");
5
- exports.Transformer = require("./Transformer");
6
- //# sourceMappingURL=types.js.map
5
+ exports.Transformer = require("./Transformer");
@@ -274,5 +274,4 @@ class TaglibLookup {
274
274
  }}
275
275
 
276
276
 
277
- module.exports = TaglibLookup;
278
- //# sourceMappingURL=index.js.map
277
+ module.exports = TaglibLookup;
@@ -720,6 +720,7 @@
720
720
  },
721
721
  "<script>": {
722
722
  "parse-options": {
723
+ "text": true,
723
724
  "preserveWhitespace": true
724
725
  },
725
726
  "@async": "#html-async",
@@ -786,6 +787,7 @@
786
787
  },
787
788
  "<style>": {
788
789
  "parse-options": {
790
+ "text": true,
789
791
  "preserveWhitespace": true
790
792
  },
791
793
  "@disabled": "#html-disabled",
@@ -824,6 +826,7 @@
824
826
  },
825
827
  "<textarea>": {
826
828
  "parse-options": {
829
+ "text": true,
827
830
  "preserveWhitespace": true
828
831
  },
829
832
  "@autocomplete": "#html-autocomplete",
@@ -1,4 +1,4 @@
1
- // Type definitions for @babel/traverse 7.14
1
+ // Type definitions for @babel/traverse 7.17
2
2
  // Project: https://github.com/babel/babel/tree/main/packages/babel-traverse, https://babeljs.io
3
3
  // Definitions by: Troy Gerwien <https://github.com/yortus>
4
4
  // Marvin Hagemeister <https://github.com/marvinhagemeister>
@@ -140,7 +140,12 @@ export class Scope {
140
140
 
141
141
  crawl(): void;
142
142
 
143
- push(opts: { id: t.LVal; init?: t.Expression | undefined; unique?: boolean | undefined; kind?: 'var' | 'let' | 'const' | undefined }): void;
143
+ push(opts: {
144
+ id: t.LVal;
145
+ init?: t.Expression | undefined;
146
+ unique?: boolean | undefined;
147
+ kind?: 'var' | 'let' | 'const' | undefined;
148
+ }): void;
144
149
 
145
150
  getProgramParent(): Scope;
146
151
 
@@ -194,13 +199,11 @@ export class Binding {
194
199
  constantViolations: NodePath[];
195
200
  }
196
201
 
197
- export type Visitor<S = {}> = VisitNodeObject<S, Node> &
198
- {
199
- [Type in Node['type']]?: VisitNode<S, Extract<Node, { type: Type }>>;
200
- } &
201
- {
202
- [K in keyof t.Aliases]?: VisitNode<S, t.Aliases[K]>;
203
- };
202
+ export type Visitor<S = {}> = VisitNodeObject<S, Node> & {
203
+ [Type in Node['type']]?: VisitNode<S, Extract<Node, { type: Type }>>;
204
+ } & {
205
+ [K in keyof t.Aliases]?: VisitNode<S, t.Aliases[K]>;
206
+ };
204
207
 
205
208
  export type VisitNode<S, P extends Node> = VisitNodeFunction<S, P> | VisitNodeObject<S, P>;
206
209
 
@@ -254,6 +257,8 @@ export class NodePath<T = Node> {
254
257
 
255
258
  getData(key: string, def?: any): any;
256
259
 
260
+ hasNode(): this is NodePath<NonNullable<this['node']>>;
261
+
257
262
  buildCodeFrameError<TError extends Error>(msg: string, Error?: new (msg: string) => TError): TError;
258
263
 
259
264
  traverse<T>(visitor: Visitor<T>, state: T): void;
@@ -548,6 +553,8 @@ export class NodePath<T = Node> {
548
553
  context?: boolean | TraversalContext,
549
554
  ): T[K] extends Array<Node | null | undefined>
550
555
  ? Array<NodePath<T[K][number]>>
556
+ : T[K] extends Array<Node | null | undefined> | null | undefined
557
+ ? Array<NodePath<NonNullable<T[K]>[number]>> | NodePath<null | undefined>
551
558
  : T[K] extends Node | null | undefined
552
559
  ? NodePath<T[K]>
553
560
  : never;
package/dist/types.d.ts CHANGED
@@ -42,7 +42,7 @@ interface BaseNode {
42
42
  extra?: Record<string, unknown>;
43
43
  }
44
44
 
45
- export type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | Marko | MarkoAttribute | MarkoCDATA | MarkoClass | MarkoComment | MarkoDeclaration | MarkoDocumentType | MarkoPlaceholder | MarkoScriptlet | MarkoSpreadAttribute | MarkoTag | MarkoTagBody | MarkoText | MemberExpression | MetaProperty | Method | Miscellaneous | MixedTypeAnnotation | ModuleDeclaration | ModuleExpression | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | Scope | SequenceExpression | SpreadElement | SpreadProperty | Standardized | Statement | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBaseType | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeScript | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression;
45
+ export type Node = Accessor | AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassAccessorProperty | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | Marko | MarkoAttribute | MarkoCDATA | MarkoClass | MarkoComment | MarkoDeclaration | MarkoDocumentType | MarkoPlaceholder | MarkoScriptlet | MarkoSpreadAttribute | MarkoTag | MarkoTagBody | MarkoText | MemberExpression | MetaProperty | Method | Miscellaneous | MixedTypeAnnotation | ModuleDeclaration | ModuleExpression | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | Scope | SequenceExpression | SpreadElement | SpreadProperty | Standardized | Statement | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBaseType | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeScript | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression;
46
46
 
47
47
  export interface ArrayExpression extends BaseNode {
48
48
  type: "ArrayExpression";
@@ -407,7 +407,7 @@ export interface ArrowFunctionExpression extends BaseNode {
407
407
 
408
408
  export interface ClassBody extends BaseNode {
409
409
  type: "ClassBody";
410
- body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | TSDeclareMethod | TSIndexSignature>;
410
+ body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>;
411
411
  }
412
412
 
413
413
  export interface ClassExpression extends BaseNode {
@@ -619,6 +619,24 @@ export interface ClassProperty extends BaseNode {
619
619
  variance: Variance | null;
620
620
  }
621
621
 
622
+ export interface ClassAccessorProperty extends BaseNode {
623
+ type: "ClassAccessorProperty";
624
+ key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName;
625
+ value: Expression | null;
626
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
627
+ decorators: Array<Decorator> | null;
628
+ computed: boolean;
629
+ static: boolean;
630
+ abstract: boolean | null;
631
+ accessibility: "public" | "private" | "protected" | null;
632
+ declare: boolean | null;
633
+ definite: boolean | null;
634
+ optional: boolean | null;
635
+ override: boolean;
636
+ readonly: boolean | null;
637
+ variance: Variance | null;
638
+ }
639
+
622
640
  export interface ClassPrivateProperty extends BaseNode {
623
641
  type: "ClassPrivateProperty";
624
642
  key: PrivateName;
@@ -1706,7 +1724,7 @@ export type RestProperty = RestElement;
1706
1724
  */
1707
1725
  export type SpreadProperty = SpreadElement;
1708
1726
 
1709
- export type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock;
1727
+ export type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassAccessorProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock;
1710
1728
  export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
1711
1729
  export type Binary = BinaryExpression | LogicalExpression;
1712
1730
  export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock;
@@ -1733,13 +1751,14 @@ export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLi
1733
1751
  export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty;
1734
1752
  export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod;
1735
1753
  export type ObjectMember = ObjectMethod | ObjectProperty;
1736
- export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty;
1754
+ export type Property = ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty;
1737
1755
  export type UnaryLike = UnaryExpression | SpreadElement;
1738
1756
  export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
1739
1757
  export type Class = ClassExpression | ClassDeclaration;
1740
1758
  export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration;
1741
1759
  export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
1742
1760
  export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier;
1761
+ export type Accessor = ClassAccessorProperty;
1743
1762
  export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName;
1744
1763
  export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType;
1745
1764
  export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType;
@@ -1792,6 +1811,7 @@ export interface Aliases {
1792
1811
  ModuleDeclaration: ModuleDeclaration;
1793
1812
  ExportDeclaration: ExportDeclaration;
1794
1813
  ModuleSpecifier: ModuleSpecifier;
1814
+ Accessor: Accessor;
1795
1815
  Private: Private;
1796
1816
  Flow: Flow;
1797
1817
  FlowType: FlowType;
@@ -1864,7 +1884,7 @@ export function withStatement(object: Expression, body: Statement): WithStatemen
1864
1884
  export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern;
1865
1885
  export function arrayPattern(elements: Array<null | PatternLike>): ArrayPattern;
1866
1886
  export function arrowFunctionExpression(params: Array<Identifier | Pattern | RestElement>, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression;
1867
- export function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | TSDeclareMethod | TSIndexSignature>): ClassBody;
1887
+ export function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>): ClassBody;
1868
1888
  export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassExpression;
1869
1889
  export function classDeclaration(id: Identifier, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassDeclaration;
1870
1890
  export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration;
@@ -1894,6 +1914,7 @@ export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceS
1894
1914
  export function optionalMemberExpression(object: Expression, property: Expression | Identifier, computed: boolean | undefined, optional: boolean): OptionalMemberExpression;
1895
1915
  export function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>, optional: boolean): OptionalCallExpression;
1896
1916
  export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty;
1917
+ export function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty;
1897
1918
  export function classPrivateProperty(key: PrivateName, value: Expression | null | undefined, decorators: Array<Decorator> | null | undefined, _static: any): ClassPrivateProperty;
1898
1919
  export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod;
1899
1920
  export function privateName(id: Identifier): PrivateName;
@@ -2070,6 +2091,8 @@ export function markoAttribute(name: string, value: Expression, modifier?: strin
2070
2091
  export function markoSpreadAttribute(value: Expression): MarkoSpreadAttribute;
2071
2092
  export function markoTagBody(body?: Array<MarkoTag | MarkoCDATA | MarkoText | MarkoPlaceholder | MarkoScriptlet | MarkoComment>, params?: Array<Identifier | Pattern | RestElement>): MarkoTagBody;
2072
2093
  export function markoTag(name: Expression, attributes: Array<MarkoAttribute | MarkoSpreadAttribute> | undefined, body: MarkoTagBody, _arguments?: Array<Expression | SpreadElement> | null, _var?: LVal | null): MarkoTag;
2094
+ export function isAccessor(node: object | null | undefined, opts?: object | null): node is Accessor;
2095
+ export function assertAccessor(node: object | null | undefined, opts?: object | null): void;
2073
2096
  export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation;
2074
2097
  export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
2075
2098
  export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder;
@@ -2116,6 +2139,8 @@ export function isCatchClause(node: object | null | undefined, opts?: object | n
2116
2139
  export function assertCatchClause(node: object | null | undefined, opts?: object | null): void;
2117
2140
  export function isClass(node: object | null | undefined, opts?: object | null): node is Class;
2118
2141
  export function assertClass(node: object | null | undefined, opts?: object | null): void;
2142
+ export function isClassAccessorProperty(node: object | null | undefined, opts?: object | null): node is ClassAccessorProperty;
2143
+ export function assertClassAccessorProperty(node: object | null | undefined, opts?: object | null): void;
2119
2144
  export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody;
2120
2145
  export function assertClassBody(node: object | null | undefined, opts?: object | null): void;
2121
2146
  export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration;
@@ -2,5 +2,4 @@
2
2
  return process.env.MARKO_DEBUG ?
3
3
  process.env.MARKO_DEBUG === "false" || process.env.MARKO_DEBUG === "0" :
4
4
  process.env.NODE_ENV && process.env.NODE_ENV !== "development";
5
- }
6
- //# sourceMappingURL=should-optimize.js.map
5
+ }
@@ -29,5 +29,4 @@ function _default(requested = _config.default.translator) {
29
29
  }
30
30
 
31
31
  return requested;
32
- }
33
- //# sourceMappingURL=try-load-translator.js.map
32
+ }
package/index.d.ts CHANGED
@@ -25,7 +25,12 @@ export type Config = {
25
25
  translator?: any;
26
26
  fileSystem?: typeof import("fs");
27
27
  modules?: "esm" | "cjs";
28
- resolveVirtualDependency?: ((filename: string, dep: { virtualPath: string, code: string, map?: SourceMap }) => string) | null;
28
+ resolveVirtualDependency?:
29
+ | ((
30
+ filename: string,
31
+ dep: { virtualPath: string; code: string; map?: SourceMap }
32
+ ) => string)
33
+ | null;
29
34
  hydrateIncludeImports?: RegExp | ((request: string) => boolean);
30
35
  optimize?: boolean;
31
36
  cache?: Map<unknown, unknown>;
@@ -48,10 +53,7 @@ export type MarkoMeta = {
48
53
  component?: string;
49
54
  watchFiles: string[];
50
55
  tags?: string[];
51
- deps: Array<
52
- | string
53
- | Dep
54
- >;
56
+ deps: Array<string | Dep>;
55
57
  };
56
58
 
57
59
  export type CompileResult = {
@@ -85,12 +87,18 @@ export function compileFileSync(
85
87
  config?: Config
86
88
  ): CompileResult;
87
89
 
88
- export function getRuntimeEntryFiles(output: string, translator?: string | undefined): string[];
90
+ export function getRuntimeEntryFiles(
91
+ output: string,
92
+ translator?: string | undefined
93
+ ): string[];
89
94
 
90
95
  export namespace taglib {
91
96
  export function excludeDir(dirname: string): void;
92
97
  export function excludePackage(packageName: string): void;
93
- export function register(id: string, props: { [x:string]: unknown }): void;
94
- export function buildLookup(dirname: string, translator?: unknown): TaglibLookup
98
+ export function register(id: string, props: { [x: string]: unknown }): void;
99
+ export function buildLookup(
100
+ dirname: string,
101
+ translator?: unknown
102
+ ): TaglibLookup;
95
103
  export function clearCaches(): void;
96
104
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/compiler",
3
3
  "description": "Marko template to JS compiler.",
4
- "version": "5.20.8",
4
+ "version": "5.21.1",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/marko/issues/new?template=Bug_report.md",
7
7
  "dependencies": {
@@ -13,10 +13,10 @@
13
13
  "@babel/runtime": "^7.16.0",
14
14
  "@babel/traverse": "^7.16.0",
15
15
  "@babel/types": "^7.16.0",
16
- "@marko/babel-utils": "^5.20.8",
16
+ "@marko/babel-utils": "^5.21.1",
17
17
  "complain": "^1.6.0",
18
18
  "he": "^1.2.0",
19
- "htmljs-parser": "^2.11.1",
19
+ "htmljs-parser": "^3.3.1",
20
20
  "jsesc": "^3.0.2",
21
21
  "lasso-package-root": "^1.0.1",
22
22
  "property-handlers": "^1.1.1",
@@ -28,7 +28,7 @@
28
28
  "strip-json-comments": "^3.1.1"
29
29
  },
30
30
  "devDependencies": {
31
- "@marko/translator-default": "^5.20.8"
31
+ "@marko/translator-default": "^5.21.1"
32
32
  },
33
33
  "files": [
34
34
  "dist",
@@ -58,6 +58,5 @@
58
58
  "type": "git",
59
59
  "url": "https://github.com/marko-js/marko/tree/master/packages/compiler"
60
60
  },
61
- "types": "index.d.ts",
62
- "gitHead": "8d1abfa37468bd28d781c2a26d49a582acba66d2"
61
+ "types": "index.d.ts"
63
62
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright 2020 eBay Inc. and contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.