File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const NO_MATCH = Symbol("nomatch");
2020
2121/**
2222 * @param {any } hljs - object that is extended (legacy)
23+ * @returns {HLJSApi }
2324 */
2425const HLJS = function ( hljs ) {
2526 // Convenience variables for build-in objects
Original file line number Diff line number Diff line change @@ -210,3 +210,22 @@ interface ModeDetails {
210210 subLanguage ?: string | string [ ]
211211 compiled ?: boolean
212212}
213+
214+ // deprecated API since v10
215+ // declare module 'highlight.js/lib/highlight.js';
216+
217+ declare module 'highlight.js' {
218+ export = hljs ;
219+ }
220+
221+ declare module 'highlight.js/lib/core' {
222+ export = hljs ;
223+ }
224+
225+ declare module 'highlight.js/lib/core.js' {
226+ export = hljs ;
227+ }
228+
229+ declare module 'highlight.js/lib/languages/*' {
230+ export default function ( hljs ?: HLJSApi ) : LanguageDetail ;
231+ }
You can’t perform that action at this time.
0 commit comments