-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this
Milestone
Description
lib Update Request
Configuration Check
My compilation target is ES2015 and my lib is the default.
Missing / Incorrect Definition
HTMLImageElement.loading is currently a string, but the only valid values for it are eager and lazy
Sample Code
While the string works, it allows for invalid values. ex:
<img loading="random value" />is valid, as well as:
interface ImageWrapper {
image: HTMLImageElement
}
const imageWrapper: ImageWrapper = { image: new HTMLImageElement() }
imageWrapper.image.loading = 'random value'I would expect both of these cases to throw a warning at least on invalid/not useful value
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this