Error when accessing CSS property value using kebab case in CSSStyleDeclaration
object
#59968
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Help Wanted
You can do this
Milestone
🔎 Search Terms
"CSS property value kebab case dash", "CSSStyleDeclaration", "getComputedStyle", "getPropertyValue"
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?ts=5.7.0-dev.20240914#code/OYUwLgwg9gtgDgVzCAJgZTATwDYgBQpQDGCMIAdmAHQBGUKmAlANoDkNAhkQNbABOUBORQBaIlGxQ+rALpA
💻 Code
🙁 Actual behavior
TypeScript reports following error:
🙂 Expected behavior
TypeScript should not report any error.
Additional information about the issue
If I update the file
node_modules/typescript/lib/lib.dom.d.ts
to includebackground-color
as follows:the error does not occur for
background-color
property.The text was updated successfully, but these errors were encountered: