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

Missing properties on CSSStyleDeclaration in upstream TypeScript #1826

Open
rishipal opened this issue Oct 14, 2024 · 0 comments
Open

Missing properties on CSSStyleDeclaration in upstream TypeScript #1826

rishipal opened this issue Oct 14, 2024 · 0 comments

Comments

@rishipal
Copy link

We're seeing a deprecation error in our tooling when someone tries to use the property webkitLineClamp in their code. Error:

webkitLineClamp is deprecated: This is a legacy alias of `lineClamp`.

I checked that the property is defined in https://fossies.org/linux/TypeScript/src/lib/dom.generated.d.ts and is marked @deprecated.

...
 4900     /**
 4901      * @deprecated This is a legacy alias of `lineClamp`.
 4902      *
 4903      * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp)
 4904      */
 4905     webkitLineClamp: string;
...
  1. Why is this property (and others) not a part of TypeScript's definition of CSSStyleDeclaration interface in the lib.dom.d.ts file? Instead I see an ~empty definition of CSSStyleDeclaration in the dom.iterable.generated.d.ts file instead. Am I mistaken to think this property should exist in lib.dom.d.ts?
  2. Even if the property gets defined in the right place in the future, it will be deprecated. So which property should we use instead? I don't see any property named lineClamp defined anywhere in either of the two .d.ts files in TypeScript.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant