Minor thing in the type definitions I noticed. The .js makes it clear that the old API looks like highlight(lang, code, ignoreIllegals), and the new API looks like highlight(code, {lang, ignoreIllegals}).
The types on the other hand imply you could do things like highlight(code, {lang: ...}, true) - but that true would be ignored at runtime.
Changes
So this separates the two forms into function overloads, and adds a /** @deprecated */ tag to the old form so IDEs will hint not to use it.
Checklist
[x] markup tests don't apply here because this is just a type definition update
Minor thing in the type definitions I noticed. The .js makes it clear that the old API looks like
highlight(lang, code, ignoreIllegals)
, and the new API looks likehighlight(code, {lang, ignoreIllegals})
.The types on the other hand imply you could do things like
highlight(code, {lang: ...}, true)
- but thattrue
would be ignored at runtime.Changes
So this separates the two forms into function overloads, and adds a
/** @deprecated */
tag to the old form so IDEs will hint not to use it.Checklist
CHANGES.md