Skip to content

Commit

Permalink
Fixed types for MathML attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
FIameCaster committed Jul 11, 2024
1 parent 5259255 commit 24e4b31
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ const addMathMLSupport = () => {
let fn = (tagName: string) => document.createElementNS("http://www.w3.org/1998/Math/MathML", tagName);
[
"annotation", "annotation-xml", "maction", "math", "merror", "mfrac", "mi",
"mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mprescripts",
"mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msubsup", "msup",
"mtable", "mtd", "mtext", "mtr", "munder", "munderover", "semantics"
"mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mprescripts",
"mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msubsup", "msup",
"mtable", "mtd", "mtext", "mtr", "munder", "munderover", "semantics"
].forEach(tag => tagMap[tag] = fn)
}

Expand Down Expand Up @@ -297,7 +297,7 @@ declare global {
}

type MathMLElementProps<T extends keyof MathMLTags> = WritableMathMLProps & {
attributes?: Partial<AriaAttributes & GlobalHTMLAttributes & MathMLAttributes[T]>,
attributes?: Partial<AriaAttributes & GlobalMathMLAttributes & MathMLAttributes[T]>,
style?: JSX.CSSProperties | string,
dataset?: { [key: string]: string | number | boolean }
ref?: ReturnType<typeof ref<MathMLElement>> | ((el: MathMLElement) => any)
Expand Down Expand Up @@ -335,7 +335,7 @@ declare global {
"aria-pos-in-set": number
"aria-pressed": Booleanish | "mixed"
"aria-read-only": Booleanish
"aria-relevant": "additions" | "all" | "removals" | "text" | "additions text"
"aria-relevant": "additions" | "all" | "removals" | "text" | "additions text"
"aria-required": Booleanish
"aria-role-description": string
"aria-row-count": number
Expand Down

0 comments on commit 24e4b31

Please sign in to comment.