Closed remcohaszing closed 4 months ago
I wasn’t aware unified accepts a boolean instead of options with for plugin though :thinking:
CI fails, because of type-coverage.
Apparently type-coverage
even fails for a good reason.
I wasn’t aware unified accepts a boolean instead of options with for plugin though 🤔
.use(remarkToc, false)
That’s how presets can turn plugins off.
Build fails tho
Does it also accept true
, or just false
?
I find this weird TBH. This means plugins can never require options.
Anyway, this is a TypeScript regression. I’ll make a reproduction. Maybe it’s best to pin typescript@~5.4.0
for now.
This means plugins can never require options.
They’re called options, indeed ;) But it’s not correct, what you say: plugins can choose to disallow the case where they are not configured by throwing.
Ok, I’ll just pin for now!
This repo already has a script to fix the types that TS generates, so perhaps that’s also possible.
Hi! This was closed. Team: If this was merged, please describe when this is likely to be released. Otherwise, please add one of the no/*
labels.
thanks for looking into this, remco!
Initial checklist
Description of changes
We ran into a regression when building unified with TypeScript 5.5. Splitting the overload into 2 separate overloads fixes it.
This doesn’t require a new release. It just fixes the types if they are built now, the types published to npm are fine.