Skip to content

Commit

Permalink
fix(lib.dom): Add specific return types for CSS Typed OM properties
Browse files Browse the repository at this point in the history
CSSUnparsedValue for custom properties --*
CSSMathValue for properties accepting calc()
CSSImageValue for properties accepting url()
Separate properties by their return values
MDN references for each overloaded function definition
  • Loading branch information
ophirbucai committed Dec 24, 2024
1 parent 19a965d commit 9738919
Show file tree
Hide file tree
Showing 9 changed files with 171 additions and 42 deletions.
18 changes: 14 additions & 4 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22785,12 +22785,22 @@ interface StylePropertyMapReadOnly {
readonly size: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/get) */
get(property: string): undefined | CSSStyleValue;
/** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/CSSUnparsedValue) */
get(property: `--${string}`): undefined | CSSUnparsedValue;
/** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/CSSTransformValue) */
get(property: "transform"): undefined | CSSKeywordValue | CSSTransformValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue) */
get(property: "animation-delay" | "animation-iteration-count" | "baseline-shift" | "block-size" | "border-bottom-left-radius" | "border-bottom-right-radius" | "border-bottom-width" | "border-end-end-radius" | "border-end-start-radius" | "border-left-width" | "border-right-width" | "border-start-end-radius" | "border-start-start-radius" | "border-top-left-radius" | "border-top-right-radius" | "border-top-width" | "column-rule-width" | "cx" | "cy" | "fill-opacity" | "flex-grow" | "flex-shrink" | "flood-opacity" | "font-size" | "font-stretch" | "font-weight" | "height" | "inline-size" | "line-height" | "margin-block-end" | "margin-block-start" | "margin-bottom" | "margin-inline-end" | "margin-inline-start" | "margin-left" | "margin-right" | "margin-top" | "math-depth" | "offset-distance" | "opacity" | "order" | "orphans" | "outline-offset" | "outline-width" | "padding-block-end" | "padding-block-start" | "padding-bottom" | "padding-inline-end" | "padding-inline-start" | "padding-left" | "padding-right" | "padding-top" | "r" | "scroll-margin-block-end" | "scroll-margin-block-start" | "scroll-margin-inline-end" | "scroll-margin-inline-start" | "shape-image-threshold" | "shape-margin" | "stop-opacity" | "stroke-dashoffset" | "stroke-miterlimit" | "stroke-opacity" | "stroke-width" | "tab-size" | "text-indent" | "text-size-adjust" | "transition-delay" | "transition-duration" | "widows" | "width" | "word-spacing" | "x" | "y"): undefined | CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue) */
get(property: "transform"): undefined | CSSTransformValue;
get(property: "-webkit-text-stroke-width" | "animation-delay" | "animation-duration" | "animation-iteration-count" | "border-block-end-width" | "border-block-start-width" | "border-bottom-width" | "border-inline-end-width" | "border-inline-start-width" | "border-left-width" | "border-right-width" | "border-top-width" | "column-rule-width" | "fill-opacity" | "flex-grow" | "flex-shrink" | "flood-opacity" | "font-size" | "font-stretch" | "font-weight" | "line-height" | "opacity" | "order" | "outline-offset" | "outline-width" | "scroll-margin-block-end" | "scroll-margin-block-start" | "scroll-margin-bottom" | "scroll-margin-inline-end" | "scroll-margin-inline-start" | "scroll-margin-left" | "scroll-margin-right" | "scroll-margin-top" | "shape-image-threshold" | "stop-opacity" | "stroke-miterlimit" | "stroke-opacity" | "tab-size" | "transition-delay" | "transition-duration" | "zoom"): undefined | CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue) */
get(property: "accent-color" | "alignment-baseline" | "anchor-name" | "anchor-scope" | "animation-composition" | "animation-direction" | "animation-duration" | "animation-fill-mode" | "animation-name" | "animation-play-state" | "animation-timeline" | "animation-timing-function" | "backdrop-filter" | "backface-visibility" | "background-attachment" | "background-blend-mode" | "background-clip" | "background-image" | "background-origin" | "background-size" | "baseline-source" | "border-bottom-style" | "border-collapse" | "border-image-source" | "border-left-style" | "border-right-style" | "border-top-style" | "bottom" | "box-shadow" | "box-sizing" | "break-after" | "break-before" | "break-inside" | "caption-side" | "clear" | "clip" | "clip-path" | "clip-rule" | "color-interpolation" | "color-interpolation-filters" | "color-rendering" | "column-count" | "column-gap" | "column-rule-style" | "column-span" | "column-width" | "contain-intrinsic-block-size" | "contain-intrinsic-inline-size" | "container-name" | "container-type" | "cursor" | "d" | "direction" | "display" | "dominant-baseline" | "empty-cells" | "field-sizing" | "fill-rule" | "filter" | "flex-basis" | "flex-direction" | "flex-wrap" | "float" | "font-kerning" | "font-optical-sizing" | "font-palette" | "font-size-adjust" | "font-style" | "font-synthesis-small-caps" | "font-synthesis-style" | "font-synthesis-weight" | "font-variant-alternates" | "font-variant-caps" | "font-variant-east-asian" | "font-variant-emoji" | "font-variant-ligatures" | "font-variant-numeric" | "font-variant-position" | "grid-auto-columns" | "grid-auto-flow" | "grid-auto-rows" | "grid-column-end" | "grid-column-start" | "grid-row-end" | "grid-row-start" | "grid-template-areas" | "grid-template-columns" | "grid-template-rows" | "hyphens" | "image-rendering" | "inset-block-end" | "inset-block-start" | "inset-inline-end" | "inset-inline-start" | "interpolate-size" | "isolation" | "left" | "letter-spacing" | "line-break" | "list-style-image" | "list-style-position" | "marker-end" | "marker-mid" | "marker-start" | "mask-type" | "math-shift" | "math-style" | "max-block-size" | "max-height" | "max-inline-size" | "max-width" | "min-block-size" | "min-height" | "min-inline-size" | "min-width" | "mix-blend-mode" | "object-fit" | "object-view-box" | "offset-anchor" | "offset-path" | "offset-position" | "outline-style" | "overflow-anchor" | "overflow-wrap" | "overflow-x" | "overflow-y" | "overlay" | "paint-order" | "perspective" | "pointer-events" | "position" | "position-anchor" | "position-area" | "position-try-fallbacks" | "position-try-order" | "position-visibility" | "resize" | "right" | "row-gap" | "rx" | "ry" | "scroll-behavior" | "scroll-padding-block-end" | "scroll-padding-block-start" | "scroll-padding-inline-end" | "scroll-padding-inline-start" | "scrollbar-gutter" | "scrollbar-width" | "shape-outside" | "shape-rendering" | "stroke-dasharray" | "stroke-linecap" | "stroke-linejoin" | "table-layout" | "text-align" | "text-align-last" | "text-anchor" | "text-decoration-line" | "text-decoration-skip-ink" | "text-decoration-style" | "text-overflow" | "text-rendering" | "text-shadow" | "text-spacing-trim" | "text-transform" | "text-underline-position" | "text-wrap-mode" | "text-wrap-style" | "top" | "touch-action" | "transform-style" | "transition-behavior" | "transition-property" | "transition-timing-function" | "unicode-bidi" | "user-select" | "vector-effect" | "vertical-align" | "view-transition-class" | "view-transition-name" | "visibility" | "white-space-collapse" | "will-change" | "word-break" | "writing-mode" | "z-index"): undefined | CSSKeywordValue;
get(property: "align-content" | "align-items" | "align-self" | "animation-composition" | "animation-direction" | "animation-fill-mode" | "animation-name" | "animation-play-state" | "animation-timing-function" | "appearance" | "aspect-ratio" | "backface-visibility" | "background-attachment" | "background-blend-mode" | "background-clip" | "background-origin" | "background-repeat" | "border-block-end-style" | "border-block-start-style" | "border-bottom-style" | "border-collapse" | "border-inline-end-style" | "border-inline-start-style" | "border-left-style" | "border-right-style" | "border-top-style" | "box-shadow" | "box-sizing" | "break-after" | "break-before" | "break-inside" | "caption-side" | "clear" | "clip-rule" | "color-interpolation-filters" | "color-scheme" | "column-count" | "column-fill" | "column-rule-style" | "column-span" | "contain" | "container-name" | "container-type" | "content-visibility" | "cursor" | "direction" | "display" | "dominant-baseline" | "empty-cells" | "fill-rule" | "flex-direction" | "flex-wrap" | "float" | "font-feature-settings" | "font-kerning" | "font-optical-sizing" | "font-palette" | "font-size-adjust" | "font-style" | "font-synthesis-small-caps" | "font-synthesis-style" | "font-synthesis-weight" | "font-variant-alternates" | "font-variant-caps" | "font-variant-east-asian" | "font-variant-ligatures" | "font-variant-numeric" | "font-variant-position" | "font-variation-settings" | "grid-auto-flow" | "grid-column-end" | "grid-column-start" | "grid-row-end" | "grid-row-start" | "grid-template-areas" | "hanging-punctuation" | "hyphenate-character" | "hyphens" | "image-orientation" | "image-rendering" | "isolation" | "justify-content" | "justify-items" | "justify-self" | "line-break" | "list-style-position" | "list-style-type" | "margin-trim" | "mask-clip" | "mask-composite" | "mask-mode" | "mask-origin" | "mask-repeat" | "mask-type" | "math-style" | "mix-blend-mode" | "object-fit" | "orphans" | "outline-style" | "overflow-wrap" | "overflow-x" | "overflow-y" | "overscroll-behavior-block" | "overscroll-behavior-inline" | "overscroll-behavior-x" | "overscroll-behavior-y" | "paint-order" | "pointer-events" | "position" | "print-color-adjust" | "quotes" | "resize" | "rotate" | "scroll-behavior" | "scroll-snap-align" | "scroll-snap-stop" | "scroll-snap-type" | "shape-rendering" | "stroke-linecap" | "stroke-linejoin" | "table-layout" | "text-align" | "text-align-last" | "text-anchor" | "text-combine-upright" | "text-decoration-line" | "text-decoration-skip-ink" | "text-decoration-style" | "text-emphasis-position" | "text-emphasis-style" | "text-orientation" | "text-overflow" | "text-rendering" | "text-shadow" | "text-transform" | "text-underline-position" | "text-wrap-mode" | "text-wrap-style" | "touch-action" | "transform-box" | "transform-style" | "transition-behavior" | "transition-property" | "transition-timing-function" | "unicode-bidi" | "vector-effect" | "view-transition-name" | "visibility" | "white-space-collapse" | "widows" | "will-change" | "word-break" | "word-wrap" | "writing-mode" | "z-index"): undefined | CSSKeywordValue;
/** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API#cssstylevalue_interfaces) */
get(property: "background-image" | "border-image-source" | "list-style-image "): undefined | CSSKeywordValue | CSSStyleValue | CSSImageValue;
/** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API#cssstylevalue_interfaces) */
get(property: "-webkit-line-clamp" | "column-width" | "contain-intrinsic-block-size" | "contain-intrinsic-height" | "contain-intrinsic-inline-size" | "contain-intrinsic-width" | "perspective" | "scale" | "stroke-dasharray" | "text-underline-offset"): undefined | CSSKeywordValue | CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API#cssstylevalue_interfaces) */
get(property: "background-position-x" | "background-position-y" | "column-gap" | "cx" | "cy" | "letter-spacing" | "min-block-size" | "min-height" | "min-inline-size" | "min-width" | "offset-distance" | "padding-block-end" | "padding-block-start" | "padding-bottom" | "padding-inline-end" | "padding-inline-start" | "padding-left" | "padding-right" | "padding-top" | "r" | "row-gap" | "shape-margin" | "stroke-dashoffset" | "stroke-width" | "text-indent" | "vertical-align" | "word-spacing" | "x" | "y"): undefined | CSSMathSum | CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API#cssstylevalue_interfaces) */
get(property: "width" | "height" | "background-size" | "block-size" | "bottom" | "flex-basis" | "grid-auto-columns" | "grid-auto-rows" | "grid-template-columns" | "grid-template-rows" | "inline-size" | "inset-block-end" | "inset-block-start" | "inset-inline-end" | "inset-inline-start" | "left" | "margin-block-end" | "margin-block-start" | "margin-bottom" | "margin-inline-end" | "margin-inline-start" | "margin-left" | "margin-right" | "margin-top" | "mask-size" | "max-block-size" | "max-height" | "max-inline-size" | "max-width" | "right" | "rx" | "ry" | "scroll-padding-block-end" | "scroll-padding-block-start" | "scroll-padding-bottom" | "scroll-padding-inline-end" | "scroll-padding-inline-start" | "scroll-padding-left" | "scroll-padding-right" | "scroll-padding-top" | "text-decoration-thickness" | "top" | "translate"): undefined | CSSKeywordValue | CSSUnitValue | CSSMathValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll) */
getAll(property: string): CSSStyleValue[];
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/has) */
Expand Down
Loading

0 comments on commit 9738919

Please sign in to comment.