marko 6.0.168 → 6.0.169

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.
@@ -1625,7 +1625,7 @@ var function_default = { analyze(fn) {
1625
1625
  const section = getSection(fn);
1626
1626
  const fnExtra = node.extra ??= {};
1627
1627
  fnExtra.section = section;
1628
- fnExtra.name = node.id?.name || (isMarkoAttribute(markoRoot) ? markoRoot.node.default ? _marko_compiler.types.toIdentifier(markoRoot.parentPath.has("var") ? markoRoot.parentPath.get("var") : markoRoot.parentPath.get("name")) : markoRoot.node.name : _marko_compiler.types.isVariableDeclarator(fn.parent) && _marko_compiler.types.isIdentifier(fn.parent.id) ? fn.parent.id.name : _marko_compiler.types.isObjectMethod(node) && _marko_compiler.types.isIdentifier(node.key) ? node.key.name : "anonymous");
1628
+ fnExtra.name = node.id?.name || (isMarkoAttribute(markoRoot) ? markoRoot.node.default ? _marko_compiler.types.toIdentifier((markoRoot.parentPath.has("var") ? markoRoot.parentPath.get("var") : markoRoot.parentPath.get("name")).toString()) : markoRoot.node.name : _marko_compiler.types.isVariableDeclarator(fn.parent) && _marko_compiler.types.isIdentifier(fn.parent.id) ? fn.parent.id.name : _marko_compiler.types.isObjectMethod(node) && _marko_compiler.types.isIdentifier(node.key) ? node.key.name : "anonymous");
1629
1629
  if (isStaticRoot(markoRoot)) {
1630
1630
  const refs = getStaticDeclRefs(fnExtra, fn);
1631
1631
  if (refs === true) registerFunction(fnExtra, true);
@@ -7945,7 +7945,7 @@ function analyzeSiblingText(placeholder) {
7945
7945
  else if (contentType === 4 || contentType === 1 || contentType === 2) return placeholderExtra[kSiblingText] = 1;
7946
7946
  else break;
7947
7947
  }
7948
- if (!prev.node && _marko_compiler.types.isProgram(placeholder.parentPath)) return placeholderExtra[kSiblingText] = 1;
7948
+ if (!prev.node && _marko_compiler.types.isProgram(placeholder.parent)) return placeholderExtra[kSiblingText] = 1;
7949
7949
  let next = placeholder.getNextSibling();
7950
7950
  while (next.node) {
7951
7951
  const contentType = getNodeContentType(next, "startType");
@@ -7953,7 +7953,7 @@ function analyzeSiblingText(placeholder) {
7953
7953
  else if (contentType === 4 || contentType === 1 || contentType === 2) return placeholderExtra[kSiblingText] = 2;
7954
7954
  else break;
7955
7955
  }
7956
- if (!next.node && _marko_compiler.types.isProgram(placeholder.parentPath)) return placeholderExtra[kSiblingText] = 2;
7956
+ if (!next.node && _marko_compiler.types.isProgram(placeholder.parent)) return placeholderExtra[kSiblingText] = 2;
7957
7957
  return placeholderExtra[kSiblingText] = 0;
7958
7958
  }
7959
7959
  function isStaticText(node) {
@@ -2,8 +2,8 @@ import { type Config, types as t } from "@marko/compiler";
2
2
  type Taglibs = [taglibId: string, taglib: Record<string, unknown>][];
3
3
  export declare function createInteropTranslator(translate5: any): {
4
4
  preferAPI: any;
5
- transform: Record<"Function" | "MarkoTag" | "ClassAccessorProperty" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayExpression" | "ArrayPattern" | "ArrayTypeAnnotation" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BigIntLiteral" | "BinaryExpression" | "LogicalExpression" | "BindExpression" | "BlockStatement" | "Program" | "TSModuleBlock" | "CatchClause" | "DoWhileStatement" | "ForInStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionExpression" | "ObjectMethod" | "SwitchStatement" | "WhileStatement" | "ForOfStatement" | "ClassMethod" | "ClassPrivateMethod" | "StaticBlock" | "MarkoTagBody" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CallExpression" | "ClassExpression" | "ClassDeclaration" | "MarkoClass" | "ClassBody" | "ClassImplements" | "ClassPrivateProperty" | "ClassProperty" | "ContinueStatement" | "ReturnStatement" | "ThrowStatement" | "ConditionalExpression" | "IfStatement" | "DebuggerStatement" | "DecimalLiteral" | "VariableDeclaration" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportNamedDeclaration" | "ImportDeclaration" | "DeclareClass" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareTypeAlias" | "DeclareOpaqueType" | "DeclareVariable" | "DeclareExportDeclaration" | "DeclareExportAllDeclaration" | "InterfaceDeclaration" | "OpaqueType" | "TypeAlias" | "EnumDeclaration" | "TSDeclareFunction" | "TSInterfaceDeclaration" | "TSTypeAliasDeclaration" | "TSEnumDeclaration" | "TSModuleDeclaration" | "TSImportEqualsDeclaration" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumNumberBody" | "EnumStringBody" | "EnumSymbolBody" | "EnumBooleanMember" | "EnumDefaultedMember" | "EnumNumberMember" | "EnumStringMember" | "ExistsTypeAnnotation" | "ExportDefaultSpecifier" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "Identifier" | "StringLiteral" | "NumericLiteral" | "NullLiteral" | "RegExpLiteral" | "MemberExpression" | "NewExpression" | "ObjectExpression" | "SequenceExpression" | "ParenthesizedExpression" | "ThisExpression" | "UnaryExpression" | "UpdateExpression" | "ImportExpression" | "MetaProperty" | "Super" | "TaggedTemplateExpression" | "TemplateLiteral" | "YieldExpression" | "Import" | "OptionalMemberExpression" | "OptionalCallExpression" | "TypeCastExpression" | "JSXElement" | "JSXFragment" | "RecordExpression" | "TupleExpression" | "ModuleExpression" | "TopicReference" | "PipelineTopicExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "TSInstantiationExpression" | "TSAsExpression" | "TSSatisfiesExpression" | "TSTypeAssertion" | "TSNonNullExpression" | "MarkoParseError" | "ExpressionStatement" | "File" | "NullLiteralTypeAnnotation" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "InferredPredicate" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "IntersectionTypeAnnotation" | "MixedTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "ObjectTypeAnnotation" | "ObjectTypeInternalSlot" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "QualifiedTypeIdentifier" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "SymbolTypeAnnotation" | "ThisTypeAnnotation" | "TupleTypeAnnotation" | "TypeofTypeAnnotation" | "TypeAnnotation" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "UnionTypeAnnotation" | "Variance" | "VoidTypeAnnotation" | "IndexedAccessType" | "OptionalIndexedAccessType" | "RestElement" | "ObjectPattern" | "VoidPattern" | "JSXAttribute" | "JSXClosingElement" | "JSXExpressionContainer" | "JSXSpreadChild" | "JSXOpeningElement" | "JSXText" | "JSXOpeningFragment" | "JSXClosingFragment" | "ImportAttribute" | "ImportDefaultSpecifier" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "InterpreterDirective" | "JSXEmptyExpression" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXSpreadAttribute" | "TSParameterProperty" | "LabeledStatement" | "MarkoDocumentType" | "MarkoDeclaration" | "MarkoCDATA" | "MarkoComment" | "MarkoText" | "MarkoPlaceholder" | "MarkoScriptlet" | "MarkoAttribute" | "MarkoSpreadAttribute" | "Noop" | "Placeholder" | "V8IntrinsicIdentifier" | "ObjectProperty" | "PrivateName" | "SpreadElement" | "SwitchCase" | "TryStatement" | "VariableDeclarator" | "WithStatement" | "TemplateElement" | "TSExportAssignment" | "TSNamespaceExportDeclaration" | "TSAnyKeyword" | "TSArrayType" | "TSBooleanKeyword" | "TSBigIntKeyword" | "TSIntrinsicKeyword" | "TSNeverKeyword" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSStringKeyword" | "TSSymbolKeyword" | "TSUndefinedKeyword" | "TSUnknownKeyword" | "TSVoidKeyword" | "TSThisType" | "TSTemplateLiteralType" | "TSLiteralType" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareMethod" | "TSQualifiedName" | "TSEnumBody" | "TSEnumMember" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInterfaceBody" | "TSIntersectionType" | "TSMappedType" | "TSMethodSignature" | "TSNamedTupleMember" | "TSOptionalType" | "TSParenthesizedType" | "TSPropertySignature" | "TSRestType" | "TSTupleType" | "TSTypeReference" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeLiteral" | "TSUnionType" | "TSTypeOperator" | "TSTypeAnnotation" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "Standardized" | "Expression" | "Binary" | "Scopable" | "BlockParent" | "Block" | "Statement" | "Terminatorless" | "CompletionStatement" | "Conditional" | "Loop" | "While" | "ExpressionWrapper" | "For" | "ForXStatement" | "FunctionParent" | "Pureish" | "Declaration" | "FunctionParameter" | "PatternLike" | "LVal" | "TSEntityName" | "Literal" | "Immutable" | "UserWhitespacable" | "Method" | "ObjectMember" | "Property" | "UnaryLike" | "Pattern" | "Class" | "ImportOrExportDeclaration" | "ExportDeclaration" | "ModuleSpecifier" | "Accessor" | "Private" | "Flow" | "FlowType" | "FlowBaseAnnotation" | "FlowDeclaration" | "FlowPredicate" | "EnumBody" | "EnumMember" | "JSX" | "Miscellaneous" | "TypeScript" | "TSTypeElement" | "TSType" | "TSBaseType" | "Marko" | "Scope" | "ModuleDeclaration" | "BindingIdentifier" | "BlockScoped" | "ExistentialTypeParam" | "ForAwaitStatement" | "Generated" | "NumericLiteralTypeAnnotation" | "Pure" | "Referenced" | "ReferencedIdentifier" | "ReferencedMemberExpression" | "RestProperty" | "SpreadProperty" | "User" | "Var" | "enter" | "exit" | `${string}|${string}`, t.VisitNode<unknown, t.Node> | undefined>;
6
- analyze: Record<"Function" | "MarkoTag" | "ClassAccessorProperty" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayExpression" | "ArrayPattern" | "ArrayTypeAnnotation" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BigIntLiteral" | "BinaryExpression" | "LogicalExpression" | "BindExpression" | "BlockStatement" | "Program" | "TSModuleBlock" | "CatchClause" | "DoWhileStatement" | "ForInStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionExpression" | "ObjectMethod" | "SwitchStatement" | "WhileStatement" | "ForOfStatement" | "ClassMethod" | "ClassPrivateMethod" | "StaticBlock" | "MarkoTagBody" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CallExpression" | "ClassExpression" | "ClassDeclaration" | "MarkoClass" | "ClassBody" | "ClassImplements" | "ClassPrivateProperty" | "ClassProperty" | "ContinueStatement" | "ReturnStatement" | "ThrowStatement" | "ConditionalExpression" | "IfStatement" | "DebuggerStatement" | "DecimalLiteral" | "VariableDeclaration" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportNamedDeclaration" | "ImportDeclaration" | "DeclareClass" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareTypeAlias" | "DeclareOpaqueType" | "DeclareVariable" | "DeclareExportDeclaration" | "DeclareExportAllDeclaration" | "InterfaceDeclaration" | "OpaqueType" | "TypeAlias" | "EnumDeclaration" | "TSDeclareFunction" | "TSInterfaceDeclaration" | "TSTypeAliasDeclaration" | "TSEnumDeclaration" | "TSModuleDeclaration" | "TSImportEqualsDeclaration" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumNumberBody" | "EnumStringBody" | "EnumSymbolBody" | "EnumBooleanMember" | "EnumDefaultedMember" | "EnumNumberMember" | "EnumStringMember" | "ExistsTypeAnnotation" | "ExportDefaultSpecifier" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "Identifier" | "StringLiteral" | "NumericLiteral" | "NullLiteral" | "RegExpLiteral" | "MemberExpression" | "NewExpression" | "ObjectExpression" | "SequenceExpression" | "ParenthesizedExpression" | "ThisExpression" | "UnaryExpression" | "UpdateExpression" | "ImportExpression" | "MetaProperty" | "Super" | "TaggedTemplateExpression" | "TemplateLiteral" | "YieldExpression" | "Import" | "OptionalMemberExpression" | "OptionalCallExpression" | "TypeCastExpression" | "JSXElement" | "JSXFragment" | "RecordExpression" | "TupleExpression" | "ModuleExpression" | "TopicReference" | "PipelineTopicExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "TSInstantiationExpression" | "TSAsExpression" | "TSSatisfiesExpression" | "TSTypeAssertion" | "TSNonNullExpression" | "MarkoParseError" | "ExpressionStatement" | "File" | "NullLiteralTypeAnnotation" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "InferredPredicate" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "IntersectionTypeAnnotation" | "MixedTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "ObjectTypeAnnotation" | "ObjectTypeInternalSlot" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "QualifiedTypeIdentifier" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "SymbolTypeAnnotation" | "ThisTypeAnnotation" | "TupleTypeAnnotation" | "TypeofTypeAnnotation" | "TypeAnnotation" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "UnionTypeAnnotation" | "Variance" | "VoidTypeAnnotation" | "IndexedAccessType" | "OptionalIndexedAccessType" | "RestElement" | "ObjectPattern" | "VoidPattern" | "JSXAttribute" | "JSXClosingElement" | "JSXExpressionContainer" | "JSXSpreadChild" | "JSXOpeningElement" | "JSXText" | "JSXOpeningFragment" | "JSXClosingFragment" | "ImportAttribute" | "ImportDefaultSpecifier" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "InterpreterDirective" | "JSXEmptyExpression" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXSpreadAttribute" | "TSParameterProperty" | "LabeledStatement" | "MarkoDocumentType" | "MarkoDeclaration" | "MarkoCDATA" | "MarkoComment" | "MarkoText" | "MarkoPlaceholder" | "MarkoScriptlet" | "MarkoAttribute" | "MarkoSpreadAttribute" | "Noop" | "Placeholder" | "V8IntrinsicIdentifier" | "ObjectProperty" | "PrivateName" | "SpreadElement" | "SwitchCase" | "TryStatement" | "VariableDeclarator" | "WithStatement" | "TemplateElement" | "TSExportAssignment" | "TSNamespaceExportDeclaration" | "TSAnyKeyword" | "TSArrayType" | "TSBooleanKeyword" | "TSBigIntKeyword" | "TSIntrinsicKeyword" | "TSNeverKeyword" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSStringKeyword" | "TSSymbolKeyword" | "TSUndefinedKeyword" | "TSUnknownKeyword" | "TSVoidKeyword" | "TSThisType" | "TSTemplateLiteralType" | "TSLiteralType" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareMethod" | "TSQualifiedName" | "TSEnumBody" | "TSEnumMember" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInterfaceBody" | "TSIntersectionType" | "TSMappedType" | "TSMethodSignature" | "TSNamedTupleMember" | "TSOptionalType" | "TSParenthesizedType" | "TSPropertySignature" | "TSRestType" | "TSTupleType" | "TSTypeReference" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeLiteral" | "TSUnionType" | "TSTypeOperator" | "TSTypeAnnotation" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "Standardized" | "Expression" | "Binary" | "Scopable" | "BlockParent" | "Block" | "Statement" | "Terminatorless" | "CompletionStatement" | "Conditional" | "Loop" | "While" | "ExpressionWrapper" | "For" | "ForXStatement" | "FunctionParent" | "Pureish" | "Declaration" | "FunctionParameter" | "PatternLike" | "LVal" | "TSEntityName" | "Literal" | "Immutable" | "UserWhitespacable" | "Method" | "ObjectMember" | "Property" | "UnaryLike" | "Pattern" | "Class" | "ImportOrExportDeclaration" | "ExportDeclaration" | "ModuleSpecifier" | "Accessor" | "Private" | "Flow" | "FlowType" | "FlowBaseAnnotation" | "FlowDeclaration" | "FlowPredicate" | "EnumBody" | "EnumMember" | "JSX" | "Miscellaneous" | "TypeScript" | "TSTypeElement" | "TSType" | "TSBaseType" | "Marko" | "Scope" | "ModuleDeclaration" | "BindingIdentifier" | "BlockScoped" | "ExistentialTypeParam" | "ForAwaitStatement" | "Generated" | "NumericLiteralTypeAnnotation" | "Pure" | "Referenced" | "ReferencedIdentifier" | "ReferencedMemberExpression" | "RestProperty" | "SpreadProperty" | "User" | "Var" | "enter" | "exit" | `${string}|${string}`, t.VisitNode<unknown, t.Node> | undefined>;
5
+ transform: Record<"Function" | "MarkoTag" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayExpression" | "ArrayPattern" | "ArrayTypeAnnotation" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BigIntLiteral" | "BinaryExpression" | "BindExpression" | "BlockStatement" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CallExpression" | "CatchClause" | "ClassAccessorProperty" | "ClassBody" | "ClassDeclaration" | "ClassExpression" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "ConditionalExpression" | "ContinueStatement" | "DebuggerStatement" | "DecimalLiteral" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "ExpressionStatement" | "File" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionExpression" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "Identifier" | "IfStatement" | "Import" | "ImportAttribute" | "ImportDeclaration" | "ImportDefaultSpecifier" | "ImportExpression" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LabeledStatement" | "LogicalExpression" | "MemberExpression" | "MetaProperty" | "MixedTypeAnnotation" | "ModuleExpression" | "NewExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "ObjectExpression" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "PrivateName" | "Program" | "QualifiedTypeIdentifier" | "RecordExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "SequenceExpression" | "SpreadElement" | "SpreadProperty" | "StaticBlock" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "Super" | "SwitchCase" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEnumBody" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSTemplateLiteralType" | "TSThisType" | "TSTupleType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "TaggedTemplateExpression" | "TemplateElement" | "TemplateLiteral" | "ThisExpression" | "ThisTypeAnnotation" | "ThrowStatement" | "TopicReference" | "TryStatement" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeofTypeAnnotation" | "UnaryExpression" | "UnionTypeAnnotation" | "UpdateExpression" | "V8IntrinsicIdentifier" | "VariableDeclaration" | "VariableDeclarator" | "Variance" | "VoidPattern" | "VoidTypeAnnotation" | "WhileStatement" | "WithStatement" | "YieldExpression" | "MarkoParseError" | "MarkoDocumentType" | "MarkoDeclaration" | "MarkoCDATA" | "MarkoComment" | "MarkoText" | "MarkoPlaceholder" | "MarkoScriptlet" | "MarkoClass" | "MarkoAttribute" | "MarkoSpreadAttribute" | "MarkoTagBody" | "Standardized" | "Expression" | "Binary" | "Scopable" | "BlockParent" | "Block" | "Statement" | "Terminatorless" | "CompletionStatement" | "Conditional" | "Loop" | "While" | "ExpressionWrapper" | "For" | "ForXStatement" | "FunctionParent" | "Pureish" | "Declaration" | "FunctionParameter" | "PatternLike" | "LVal" | "TSEntityName" | "Literal" | "Immutable" | "UserWhitespacable" | "Method" | "ObjectMember" | "Property" | "UnaryLike" | "Pattern" | "Class" | "ImportOrExportDeclaration" | "ExportDeclaration" | "ModuleSpecifier" | "Accessor" | "Private" | "Flow" | "FlowType" | "FlowBaseAnnotation" | "FlowDeclaration" | "FlowPredicate" | "EnumBody" | "EnumMember" | "JSX" | "Miscellaneous" | "TypeScript" | "TSTypeElement" | "TSType" | "TSBaseType" | "ModuleDeclaration" | "Marko" | "Scope" | "BindingIdentifier" | "BlockScoped" | "ExistentialTypeParam" | "ForAwaitStatement" | "Generated" | "NumericLiteralTypeAnnotation" | "Pure" | "Referenced" | "ReferencedIdentifier" | "ReferencedMemberExpression" | "User" | "Var" | "enter" | "exit" | `${string}|${string}`, t.VisitNode<unknown, t.Node> | undefined>;
6
+ analyze: Record<"Function" | "MarkoTag" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayExpression" | "ArrayPattern" | "ArrayTypeAnnotation" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BigIntLiteral" | "BinaryExpression" | "BindExpression" | "BlockStatement" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CallExpression" | "CatchClause" | "ClassAccessorProperty" | "ClassBody" | "ClassDeclaration" | "ClassExpression" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "ConditionalExpression" | "ContinueStatement" | "DebuggerStatement" | "DecimalLiteral" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "ExpressionStatement" | "File" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionExpression" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "Identifier" | "IfStatement" | "Import" | "ImportAttribute" | "ImportDeclaration" | "ImportDefaultSpecifier" | "ImportExpression" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LabeledStatement" | "LogicalExpression" | "MemberExpression" | "MetaProperty" | "MixedTypeAnnotation" | "ModuleExpression" | "NewExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "ObjectExpression" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "PrivateName" | "Program" | "QualifiedTypeIdentifier" | "RecordExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "SequenceExpression" | "SpreadElement" | "SpreadProperty" | "StaticBlock" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "Super" | "SwitchCase" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEnumBody" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSTemplateLiteralType" | "TSThisType" | "TSTupleType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "TaggedTemplateExpression" | "TemplateElement" | "TemplateLiteral" | "ThisExpression" | "ThisTypeAnnotation" | "ThrowStatement" | "TopicReference" | "TryStatement" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeofTypeAnnotation" | "UnaryExpression" | "UnionTypeAnnotation" | "UpdateExpression" | "V8IntrinsicIdentifier" | "VariableDeclaration" | "VariableDeclarator" | "Variance" | "VoidPattern" | "VoidTypeAnnotation" | "WhileStatement" | "WithStatement" | "YieldExpression" | "MarkoParseError" | "MarkoDocumentType" | "MarkoDeclaration" | "MarkoCDATA" | "MarkoComment" | "MarkoText" | "MarkoPlaceholder" | "MarkoScriptlet" | "MarkoClass" | "MarkoAttribute" | "MarkoSpreadAttribute" | "MarkoTagBody" | "Standardized" | "Expression" | "Binary" | "Scopable" | "BlockParent" | "Block" | "Statement" | "Terminatorless" | "CompletionStatement" | "Conditional" | "Loop" | "While" | "ExpressionWrapper" | "For" | "ForXStatement" | "FunctionParent" | "Pureish" | "Declaration" | "FunctionParameter" | "PatternLike" | "LVal" | "TSEntityName" | "Literal" | "Immutable" | "UserWhitespacable" | "Method" | "ObjectMember" | "Property" | "UnaryLike" | "Pattern" | "Class" | "ImportOrExportDeclaration" | "ExportDeclaration" | "ModuleSpecifier" | "Accessor" | "Private" | "Flow" | "FlowType" | "FlowBaseAnnotation" | "FlowDeclaration" | "FlowPredicate" | "EnumBody" | "EnumMember" | "JSX" | "Miscellaneous" | "TypeScript" | "TSTypeElement" | "TSType" | "TSBaseType" | "ModuleDeclaration" | "Marko" | "Scope" | "BindingIdentifier" | "BlockScoped" | "ExistentialTypeParam" | "ForAwaitStatement" | "Generated" | "NumericLiteralTypeAnnotation" | "Pure" | "Referenced" | "ReferencedIdentifier" | "ReferencedMemberExpression" | "User" | "Var" | "enter" | "exit" | `${string}|${string}`, t.VisitNode<unknown, t.Node> | undefined>;
7
7
  translate: t.Visitor<unknown>;
8
8
  tagDiscoveryDirs: any[];
9
9
  taglibs: Taglibs;
@@ -86,6 +86,7 @@ declare module "@marko/compiler/dist/types" {
86
86
  pruned?: true;
87
87
  isEffect?: true;
88
88
  spreadFrom?: Binding;
89
+ merged?: NodeExtra;
89
90
  [kIsInvoked]?: true;
90
91
  }
91
92
  interface FunctionExtra {
@@ -129,7 +130,7 @@ export declare function addRead(exprExtra: ReferencedExtra, extra: t.NodeExtra,
129
130
  export declare function dropNodes(node: t.Node | t.Node[]): void;
130
131
  export declare function getCanonicalBinding(binding: Binding): Binding;
131
132
  export declare function getAllTagReferenceNodes(tag: t.MarkoTag, referenceNodes?: t.Node[]): t.Node[];
132
- export declare function getScopeAccessorLiteral(binding: Binding, encoded?: boolean, includeId?: boolean): t.StringLiteral | t.NumericLiteral;
133
+ export declare function getScopeAccessorLiteral(binding: Binding, encoded?: boolean, includeId?: boolean): t.NumericLiteral | t.StringLiteral;
133
134
  export declare function getScopeAccessor(binding: Binding, encoded?: boolean, includeId?: boolean): string;
134
135
  export declare function getDebugScopeAccess(binding: Binding): {
135
136
  root: Binding;
@@ -139,7 +140,7 @@ export declare function getDebugName(binding: Binding): string;
139
140
  export declare function getDebugNames(refs: ReferencedBindings): string;
140
141
  export declare function getDebugNamesAsIdentifier(refs: ReferencedBindings): string;
141
142
  export declare function getSectionInstancesAccessor(section: Section): string;
142
- export declare function getSectionInstancesAccessorLiteral(section: Section): t.StringLiteral | t.NumericLiteral | undefined;
143
+ export declare function getSectionInstancesAccessorLiteral(section: Section): t.NumericLiteral | t.StringLiteral | undefined;
143
144
  export declare function getReadReplacement(node: t.Identifier | t.MemberExpression | t.OptionalMemberExpression, signal?: Signal): t.Expression | undefined;
144
145
  export declare function hasNonConstantPropertyAlias(ref: Binding): boolean;
145
146
  export declare function pruneBinding(binding: Binding): boolean;
@@ -48,5 +48,5 @@ export declare function writeRegisteredFns(): void;
48
48
  export declare function addHTMLEffectCall(section: Section, referencedBindings?: ReferencedBindings): void;
49
49
  export declare function writeHTMLResumeStatements(path: t.NodePath<t.MarkoTagBody | t.Program>): void;
50
50
  export declare function getSetup(section: Section): Signal | undefined;
51
- export declare function replaceRegisteredFunctionNode(node: t.Node): t.CallExpression | t.ClassPrivateProperty | t.ClassProperty | t.VariableDeclaration | t.Identifier | t.ObjectProperty | undefined;
51
+ export declare function replaceRegisteredFunctionNode(node: t.Node): t.CallExpression | t.ClassPrivateProperty | t.ClassProperty | t.Identifier | t.ObjectProperty | t.VariableDeclaration | undefined;
52
52
  export {};
@@ -1,10 +1,14 @@
1
1
  import { types as t } from "@marko/compiler";
2
2
  declare module "@marko/compiler/dist/types" {
3
+ interface ProgramExtra {
4
+ featureType?: "class" | "tags";
5
+ }
3
6
  interface MarkoTagExtra {
4
7
  tagNameType?: TagNameType;
5
8
  tagNameNullable?: boolean;
6
9
  tagNameDynamic?: boolean;
7
10
  tagNameImported?: string;
11
+ featureType?: ProgramExtra["featureType"];
8
12
  }
9
13
  }
10
14
  export declare enum TagNameType {
@@ -1,3 +1,3 @@
1
1
  import { types as t } from "@marko/compiler";
2
- export declare function toFirstExpressionOrBlock(stmts: t.Statement[]): t.ArrayExpression | t.ArrowFunctionExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.LogicalExpression | t.BindExpression | t.BlockStatement | t.FunctionExpression | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.Identifier | t.StringLiteral | t.NumericLiteral | t.NullLiteral | t.RegExpLiteral | t.MemberExpression | t.NewExpression | t.SequenceExpression | t.ParenthesizedExpression | t.ThisExpression | t.UnaryExpression | t.UpdateExpression | t.ImportExpression | t.MetaProperty | t.Super | t.TaggedTemplateExpression | t.TemplateLiteral | t.YieldExpression | t.Import | t.OptionalMemberExpression | t.OptionalCallExpression | t.TypeCastExpression | t.JSXElement | t.JSXFragment | t.RecordExpression | t.TupleExpression | t.ModuleExpression | t.TopicReference | t.PipelineTopicExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.TSInstantiationExpression | t.TSAsExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TSNonNullExpression | t.MarkoParseError;
3
- export declare function toParenthesizedExpressionIfNeeded(expr: t.Expression): t.ArrayExpression | t.ArrowFunctionExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.LogicalExpression | t.BindExpression | t.FunctionExpression | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.Identifier | t.StringLiteral | t.NumericLiteral | t.NullLiteral | t.RegExpLiteral | t.MemberExpression | t.NewExpression | t.SequenceExpression | t.ParenthesizedExpression | t.ThisExpression | t.UnaryExpression | t.UpdateExpression | t.ImportExpression | t.MetaProperty | t.Super | t.TaggedTemplateExpression | t.TemplateLiteral | t.YieldExpression | t.Import | t.OptionalMemberExpression | t.OptionalCallExpression | t.TypeCastExpression | t.JSXElement | t.JSXFragment | t.RecordExpression | t.TupleExpression | t.ModuleExpression | t.TopicReference | t.PipelineTopicExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.TSInstantiationExpression | t.TSAsExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TSNonNullExpression | t.MarkoParseError;
2
+ export declare function toFirstExpressionOrBlock(stmts: t.Statement[]): t.ArrayExpression | t.ArrowFunctionExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.BindExpression | t.BlockStatement | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.FunctionExpression | t.Identifier | t.Import | t.ImportExpression | t.JSXElement | t.JSXFragment | t.LogicalExpression | t.MemberExpression | t.MetaProperty | t.ModuleExpression | t.NewExpression | t.NullLiteral | t.NumericLiteral | t.OptionalCallExpression | t.OptionalMemberExpression | t.ParenthesizedExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.PipelineTopicExpression | t.RecordExpression | t.RegExpLiteral | t.SequenceExpression | t.StringLiteral | t.Super | t.TSAsExpression | t.TSInstantiationExpression | t.TSNonNullExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TaggedTemplateExpression | t.TemplateLiteral | t.ThisExpression | t.TopicReference | t.TupleExpression | t.TypeCastExpression | t.UnaryExpression | t.UpdateExpression | t.YieldExpression | t.MarkoParseError;
3
+ export declare function toParenthesizedExpressionIfNeeded(expr: t.Expression): t.ArrayExpression | t.ArrowFunctionExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.BindExpression | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.FunctionExpression | t.Identifier | t.Import | t.ImportExpression | t.JSXElement | t.JSXFragment | t.LogicalExpression | t.MemberExpression | t.MetaProperty | t.ModuleExpression | t.NewExpression | t.NullLiteral | t.NumericLiteral | t.OptionalCallExpression | t.OptionalMemberExpression | t.ParenthesizedExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.PipelineTopicExpression | t.RecordExpression | t.RegExpLiteral | t.SequenceExpression | t.StringLiteral | t.Super | t.TSAsExpression | t.TSInstantiationExpression | t.TSNonNullExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TaggedTemplateExpression | t.TemplateLiteral | t.ThisExpression | t.TopicReference | t.TupleExpression | t.TypeCastExpression | t.UnaryExpression | t.UpdateExpression | t.YieldExpression | t.MarkoParseError;
@@ -1,6 +1,6 @@
1
1
  import { types as t } from "@marko/compiler";
2
2
  export declare function isValidPropertyIdentifier(name: string): boolean;
3
- export declare function toPropertyName(name: string): t.Identifier | t.StringLiteral | t.NumericLiteral;
3
+ export declare function toPropertyName(name: string): t.Identifier | t.NumericLiteral | t.StringLiteral;
4
4
  export declare function toObjectProperty(name: string, value: t.Expression): t.ObjectProperty;
5
5
  export declare function toMemberExpression(object: t.Expression, key: string): t.MemberExpression;
6
6
  export declare function toMemberExpression(object: t.Expression, key: string, optional: false | undefined): t.MemberExpression;
@@ -1,4 +1,9 @@
1
1
  import type { types as t } from "@marko/compiler";
2
+ declare module "@marko/compiler/dist/types" {
3
+ interface NodeExtra {
4
+ tagImport?: string;
5
+ }
6
+ }
2
7
  declare const _default: {
3
8
  analyze(this: unknown, importDecl: t.NodePath<t.ImportDeclaration>): void;
4
9
  translate: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.168",
3
+ "version": "6.0.169",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
package/tags-html.d.ts CHANGED
@@ -916,8 +916,7 @@ declare global {
916
916
  | AttrMissing
917
917
  | "application/x-www-form-urlencoded"
918
918
  | "multipart/form-data"
919
- | "text/plain"
920
- | (string & {});
919
+ | "text/plain";
921
920
  /**
922
921
  * Specifies the HTTP method used to submit the form to the server.
923
922
  * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-method
@@ -1501,7 +1500,7 @@ declare global {
1501
1500
  value?: AttrStringOrNumber;
1502
1501
 
1503
1502
  /** @deprecated */
1504
- type?: AttrMimeType;
1503
+ type?: AttrString;
1505
1504
  }
1506
1505
  // TODO break into multiple interfaces based on rel?
1507
1506
  interface Link extends HTMLAttributes<HTMLLinkElement> {
@@ -5707,7 +5706,7 @@ interface CommonAttributes<T extends Element> {
5707
5706
  * Defines the hierarchical level of an element within a structure.
5708
5707
  * @see https://www.w3.org/TR/wai-aria-1.1/#aria-level
5709
5708
  */
5710
- "aria-level"?: AttrString;
5709
+ "aria-level"?: AttrMissing | number | string;
5711
5710
  /**
5712
5711
  * Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies,
5713
5712
  * and user can expect from the live region.