Skip to content

Commit 3a5b8ae

Browse files
committed
refactor(HighlightJS): Add types on parameters in hljs functions
1 parent 283e6f0 commit 3a5b8ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/ngx-highlightjs/src/lib/highlight.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ export class HighlightJS {
3838
}
3939
}
4040

41-
highlight(name, value, ignore_illegals, continuation): HighlightResult {
41+
highlight(name: string, value: string, ignore_illegals: boolean, continuation?: any): HighlightResult {
4242
if (typeof hljs !== 'undefined') {
4343
return hljs.highlight(name, value, ignore_illegals, continuation);
4444
}
4545
}
4646

47-
highlightAuto(value, languageSubset): HighlightResult {
47+
highlightAuto(value: string, languageSubset: string[]): HighlightResult {
4848
if (typeof hljs !== 'undefined') {
4949
return hljs.highlightAuto(value, languageSubset);
5050
}
@@ -62,7 +62,7 @@ export class HighlightJS {
6262
}
6363
}
6464

65-
configure(options) {
65+
configure(options: HighlightOptions) {
6666
if (typeof hljs !== 'undefined') {
6767
hljs.configure(this.options.config);
6868
}

0 commit comments

Comments
 (0)