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

"as"-attribute is missing for link-tag in typings #192

Closed
jablonski opened this issue Sep 2, 2023 · 2 comments
Closed

"as"-attribute is missing for link-tag in typings #192

jablonski opened this issue Sep 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@jablonski
Copy link
Contributor

jablonski commented Sep 2, 2023

Typescript complains about "as"-attribute. Current workaround is to use a template literal.

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload

@ncpa0cpl ncpa0cpl added the bug Something isn't working label Sep 2, 2023
@ncpa0cpl
Copy link
Collaborator

ncpa0cpl commented Sep 2, 2023

Until this is fixed you can use the following to monkey-patch the type definition:

declare global {
  namespace JSXTE {
    interface BaseHTMLTagProps {
      as?: string;
    }
  }
}

@jablonski
Copy link
Contributor Author

Yes, this is another good workaround, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants