I wish TypeScript did expose it's version as a string type.
It would make it easier to reason about TS's behavior inside various coding playgrounds/sandboxes, such as the ones on https://type-level-typescript.com
Something like:
Raw version of the side-scroll prevention script:
```js
if (
navigator.userAgent.indexOf('Chrome') < 0 &&
navigator.userAgent.indexOf('Safari') > 0
) {
document.addEventListener('scroll', function () {
if (document.documentElement.scrollLeft > 0) { document.documentElement.scrollLeft = 0;
}
});
}
```
I wish TypeScript did expose it's version as a string type.
It would make it easier to reason about TS's behavior inside various coding playgrounds/sandboxes, such as the ones on https://type-level-typescript.com
Something like:
Ran into a bug where TypeScript infers that an empty array (literal `[]`) to be of type `never[]`, which it interprets to never happen and thus to be of no sigificance.
Runtime errors then ensue.
TypeScript Fun.
An open-ended string type that with auto-completion for commonly used/known values. 🪄