Comments (2)
as const
can also be done in JSDoc- I’m pretty sure TS already infers that file as
as const
, I am explicitly overwriting that with the explicit type - whether to use an as-const or a record depends: In other projects, I use this project, and want to look strings up in this project. That is a type error if
as const
was used. That is why these are records and arrays - I don’t think TS can do both.
from html-element-attributes.
Closing as I’m not sure what to do. The types that are exposed are Record<string, Array<string>>
so that arbitrary strings can be used to look into it. as const
, or the default, prevent string
lookup.
from html-element-attributes.
Related Issues (7)
- <span> is missing. HOT 1
- Deprecated attributes? HOT 1
- commonjs build HOT 2
- missing aria/role HOT 1
- Upstream data errors HOT 2
- Missing html element 'span' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-element-attributes.