g-plane / typed-query-selector

Better typed `querySelector` and `querySelectorAll`.
https://www.npmjs.com/package/typed-query-selector
MIT License
729 stars 11 forks source link

Support strings with variables #18

Closed yakov116 closed 3 years ago

yakov116 commented 3 years ago

For example a.mydiv ${hello}

Live example (where we would use it)

https://github.com/sindresorhus/refined-github/blob/30828a891c94f12cdd1595f27a13899b3fc4d203/source/features/edit-readme.tsx#L22

g-plane commented 3 years ago

Technically, this may be impossible due to type system of TypeScript. You can use it with as const, but it may or may not work, depending on your input string.

g-plane commented 3 years ago

Closing due to inactivity.