File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1+ export namespace Endgine {
2+ type Options = {
3+ /** Language Mode Name */
4+ language : string ,
5+ }
6+
7+ type Result = {
8+ markup : string ,
9+ } ;
10+
11+ export type callback = ( src : string , options ?: Options ) => Result ;
12+ }
13+
114export default class HTMLCodeBlockElement extends HTMLElement {
215 /**
316 * Returns the result of highlighting the received source code string.
@@ -7,12 +20,7 @@ export default class HTMLCodeBlockElement extends HTMLElement {
720 * @param options - Option for highlight
821 * @returns - Object of the highlight result
922 */
10- static highlight : ( src : string , options ?: {
11- /** Language Mode Name */
12- language : string ,
13- } ) => {
14- markup : string ,
15- } = ( ) => {
23+ static highlight : Endgine . callback = ( ) => {
1624 throw new TypeError ( 'The syntax highlighting engine is not set to `HTMLCodeBlockElement.highlight`.' ) ;
1725 } ;
1826
You can’t perform that action at this time.
0 commit comments