Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types): separate out deprecated
highlight
overload (#3987)
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. 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.
- Loading branch information