Preventing "illegal invocation" errors in TypeScript
Published on in TypeScript
The TypeScript compiler could help prevent "illegal invocation" errors at compile time, at least theoretically.
Published on in TypeScript
The TypeScript compiler could help prevent "illegal invocation" errors at compile time, at least theoretically.
dangerouslySetInnerHTML
Published on in JavaScript, React and TypeScript
Last updated on
To handle internal link clicks when using dangerouslySetInnerHTML
,
attach click event listeners to the rendered links.
In the listener, push the link to the browser history.
.mts
is a cool file extension (TypeScript ES modules)Published on in JavaScript, Node.js and TypeScript
What's that, a file extension named after me?! Or a file extension for TypeScript files that are always ES modules?
Published on in JavaScript and TypeScript
Using recursion,
logical OR assignment operator (||=
),
BigInts
and more!
Published on in TypeScript
"Parameter properties" reduce boilerplate in classes, but they can also make the code hard to read.