Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4ee4e4

Browse files
committed
(chore) declare ambient modules for lib/core & languges
1 parent0656588 commita4ee4e4

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎src/highlight.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
*/
2425
constHLJS=function(hljs){
2526
// Convenience variables for build-in objects

‎types/index.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
exportdefaultfunction(hljs?:HLJSApi):LanguageDetail;
231+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp