Dan Vanderkam

Results 172 comments of Dan Vanderkam

I'd like a way to do this, too, in my case to add "statements" to the `metricsToShow` option for the html-spa reporter, see https://github.com/istanbuljs/istanbuljs/issues/596

As it turns out, it's not too hard to replicate what `nyc report` does in a script of your own and pass through the options you want. Here's my script...

Yes, this is still relevant.

That's a cute idea (and mathematically correct!) but unfortunately TypeScript [isn't able to follow along][1]: ```ts type XOR = Exclude type ExclusiveThing = XOR; // ^? type ExclusiveThing = ThingOne...

_Comment by **Robert Konigsberg** (**robert_konigsberg**) on **2021-02-04 11:15**:_ I love everything about this article, especially that these things make you cringe! Thanks for your honesty.

_Comment by **Bob** on **2020-11-22 12:53**:_ Where does `Capitalize` come from?

_Comment by **danvdk** on **2020-11-22 01:50**:_ It's one of four new built-in generics in TS 4.1: Uppercase, Lowercase, Capitalize and Uncapitalize. Take a look at the TypeScript 4.1 release post.

_Comment by **Pomar81** (**pomar81**) on **2020-11-22 06:51**:_ Unfortunately type OnString = `on${string}` gives an error in playgroudhttps://www.typescriptlang....

_Comment by **danvdk** on **2020-11-22 07:17**:_ You're on the 4.1 beta for the playground. Try it on the 4.1 release (4.1.2) or a nightly, it'll work: https://www.typescriptlang....

_Comment by **Pomar81** (**pomar81**) on **2020-11-23 05:13**:_ it will be great if we can type something like type WithData = {[key: `data-${string}`]: string}