Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added strict typings for ARIAMixin with literals #1840

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 34 additions & 33 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2404,89 +2404,89 @@ interface ANGLE_instanced_arrays {

interface ARIAMixin {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaAtomic) */
ariaAtomic: string | null;
ariaAtomic: "false" | "true" | null;
DeepDoge marked this conversation as resolved.
Show resolved Hide resolved
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) */
ariaAutoComplete: string | null;
ariaAutoComplete: "inline" | "list" | "both" | "none" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleLabel) */
ariaBrailleLabel: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleRoleDescription) */
ariaBrailleRoleDescription: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaBusy) */
ariaBusy: string | null;
ariaBusy: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaChecked) */
ariaChecked: string | null;
ariaChecked: "true" | "mixed" | "false" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColCount) */
ariaColCount: string | null;
ariaColCount: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) */
ariaColIndex: string | null;
ariaColIndex: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) */
ariaColIndexText: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) */
ariaColSpan: string | null;
ariaColSpan: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) */
ariaCurrent: string | null;
ariaCurrent: "page" | "step" | "location" | "date" | "time" | "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) */
ariaDescription: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) */
ariaDisabled: string | null;
ariaDisabled: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) */
ariaExpanded: string | null;
ariaExpanded: "true" | "false" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaHasPopup) */
ariaHasPopup: string | null;
ariaHasPopup: "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaHidden) */
ariaHidden: string | null;
ariaInvalid: string | null;
ariaHidden: "true" | "false" | "undefined" | null;
ariaInvalid: "true" | "false" | "grammar" | "spelling" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaKeyShortcuts) */
ariaKeyShortcuts: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLabel) */
ariaLabel: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLevel) */
ariaLevel: string | null;
ariaLevel: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLive) */
ariaLive: string | null;
ariaLive: "assertive" | "off" | "polite" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaModal) */
ariaModal: string | null;
ariaModal: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiLine) */
ariaMultiLine: string | null;
ariaMultiLine: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiSelectable) */
ariaMultiSelectable: string | null;
ariaMultiSelectable: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaOrientation) */
ariaOrientation: string | null;
ariaOrientation: "horizontal" | "vertical" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPlaceholder) */
ariaPlaceholder: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPosInSet) */
ariaPosInSet: string | null;
ariaPosInSet: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPressed) */
ariaPressed: string | null;
ariaPressed: "true" | "false" | "mixed" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaReadOnly) */
ariaReadOnly: string | null;
ariaReadOnly: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRequired) */
ariaRequired: string | null;
ariaRequired: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRoleDescription) */
ariaRoleDescription: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowCount) */
ariaRowCount: string | null;
ariaRowCount: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) */
ariaRowIndex: string | null;
ariaRowIndex: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) */
ariaRowIndexText: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) */
ariaRowSpan: string | null;
ariaRowSpan: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) */
ariaSelected: string | null;
ariaSelected: "true" | "false" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSetSize) */
ariaSetSize: string | null;
ariaSetSize: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSort) */
ariaSort: string | null;
ariaSort: "ascending" | "descending" | "none" | "other" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMax) */
ariaValueMax: string | null;
ariaValueMax: `${number}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMin) */
ariaValueMin: string | null;
ariaValueMin: `${number}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueNow) */
ariaValueNow: string | null;
ariaValueNow: `${number}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueText) */
ariaValueText: string | null;
role: string | null;
role: ARIARole | null;
DeepDoge marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down Expand Up @@ -28947,6 +28947,7 @@ type Uint32List = Uint32Array | GLuint[];
type VibratePattern = number | number[];
type WindowProxy = Window;
type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
type ARIARole = "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "comment" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "image" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "mark" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "meter" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "suggestion" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem";
type AlignSetting = "center" | "end" | "left" | "right" | "start";
type AlphaOption = "discard" | "keep";
type AnimationPlayState = "finished" | "idle" | "paused" | "running";
Expand Down
67 changes: 34 additions & 33 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2404,89 +2404,89 @@ interface ANGLE_instanced_arrays {

interface ARIAMixin {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaAtomic) */
ariaAtomic: string | null;
ariaAtomic: "false" | "true" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) */
ariaAutoComplete: string | null;
ariaAutoComplete: "inline" | "list" | "both" | "none" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleLabel) */
ariaBrailleLabel: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaBrailleRoleDescription) */
ariaBrailleRoleDescription: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaBusy) */
ariaBusy: string | null;
ariaBusy: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaChecked) */
ariaChecked: string | null;
ariaChecked: "true" | "mixed" | "false" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColCount) */
ariaColCount: string | null;
ariaColCount: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) */
ariaColIndex: string | null;
ariaColIndex: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) */
ariaColIndexText: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) */
ariaColSpan: string | null;
ariaColSpan: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) */
ariaCurrent: string | null;
ariaCurrent: "page" | "step" | "location" | "date" | "time" | "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) */
ariaDescription: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) */
ariaDisabled: string | null;
ariaDisabled: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) */
ariaExpanded: string | null;
ariaExpanded: "true" | "false" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaHasPopup) */
ariaHasPopup: string | null;
ariaHasPopup: "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaHidden) */
ariaHidden: string | null;
ariaInvalid: string | null;
ariaHidden: "true" | "false" | "undefined" | null;
ariaInvalid: "true" | "false" | "grammar" | "spelling" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaKeyShortcuts) */
ariaKeyShortcuts: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLabel) */
ariaLabel: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLevel) */
ariaLevel: string | null;
ariaLevel: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaLive) */
ariaLive: string | null;
ariaLive: "assertive" | "off" | "polite" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaModal) */
ariaModal: string | null;
ariaModal: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiLine) */
ariaMultiLine: string | null;
ariaMultiLine: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaMultiSelectable) */
ariaMultiSelectable: string | null;
ariaMultiSelectable: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaOrientation) */
ariaOrientation: string | null;
ariaOrientation: "horizontal" | "vertical" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPlaceholder) */
ariaPlaceholder: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPosInSet) */
ariaPosInSet: string | null;
ariaPosInSet: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaPressed) */
ariaPressed: string | null;
ariaPressed: "true" | "false" | "mixed" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaReadOnly) */
ariaReadOnly: string | null;
ariaReadOnly: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRequired) */
ariaRequired: string | null;
ariaRequired: "true" | "false" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRoleDescription) */
ariaRoleDescription: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowCount) */
ariaRowCount: string | null;
ariaRowCount: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) */
ariaRowIndex: string | null;
ariaRowIndex: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) */
ariaRowIndexText: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) */
ariaRowSpan: string | null;
ariaRowSpan: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) */
ariaSelected: string | null;
ariaSelected: "true" | "false" | "undefined" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSetSize) */
ariaSetSize: string | null;
ariaSetSize: `${bigint}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSort) */
ariaSort: string | null;
ariaSort: "ascending" | "descending" | "none" | "other" | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMax) */
ariaValueMax: string | null;
ariaValueMax: `${number}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueMin) */
ariaValueMin: string | null;
ariaValueMin: `${number}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueNow) */
ariaValueNow: string | null;
ariaValueNow: `${number}` | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaValueText) */
ariaValueText: string | null;
role: string | null;
role: ARIARole | null;
}

/**
Expand Down Expand Up @@ -28928,6 +28928,7 @@ type Uint32List = Uint32Array | GLuint[];
type VibratePattern = number | number[];
type WindowProxy = Window;
type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
type ARIARole = "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "comment" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "image" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "mark" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "meter" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "suggestion" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem";
type AlignSetting = "center" | "end" | "left" | "right" | "start";
type AlphaOption = "discard" | "keep";
type AnimationPlayState = "finished" | "idle" | "paused" | "running";
Expand Down
90 changes: 90 additions & 0 deletions inputfiles/addedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,96 @@
"value": [
"webauthn"
]
},
"ARIARole": {
"name": "ARIARole",
"value": [
"alert",
"alertdialog",
"application",
"article",
"banner",
"blockquote",
"button",
"caption",
"cell",
"checkbox",
"code",
"columnheader",
"combobox",
"comment",
"complementary",
"contentinfo",
"definition",
"deletion",
"dialog",
"document",
"emphasis",
"feed",
"figure",
"form",
"generic",
"grid",
"gridcell",
"group",
"heading",
"image",
"img",
"insertion",
"link",
"list",
"listbox",
"listitem",
"log",
"main",
"mark",
"marquee",
"math",
"menu",
"menubar",
"menuitem",
"menuitemcheckbox",
"menuitemradio",
"meter",
"navigation",
"none",
"note",
"option",
"paragraph",
"presentation",
"progressbar",
"radio",
"radiogroup",
"region",
"row",
"rowgroup",
"rowheader",
"scrollbar",
"search",
"searchbox",
"separator",
"slider",
"spinbutton",
"status",
"strong",
"subscript",
"suggestion",
"superscript",
"switch",
"tab",
"table",
"tablist",
"tabpanel",
"term",
"textbox",
"time",
"timer",
"toolbar",
"tooltip",
"tree",
"treegrid",
"treeitem"
]
}
}
},
Expand Down
Loading