Skip to content

Commit

Permalink
fix highlight func signature
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Apr 5, 2020
1 parent 432c1fb commit ee2cf74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions codejar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ type Options = {

export class CodeJar {
private readonly editor: HTMLElement
private readonly highlight: (e: HTMLElement) => {}
private readonly highlight: (e: HTMLElement) => void
private readonly listeners: [string, any][] = []
private options: Options
private history: HistoryRecord[] = []
private at = -1
private focus = false
private callback?: (code: string) => void

constructor(editor: HTMLElement, highlight: (e: HTMLElement) => {}, options: Partial<Options> = {}) {
constructor(editor: HTMLElement, highlight: (e: HTMLElement) => void, options: Partial<Options> = {}) {
this.editor = editor
this.highlight = highlight
this.options = {
Expand Down
2 changes: 1 addition & 1 deletion linenumbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type Options = {
}

export function withLineNumbers(
highlight: (e: HTMLElement) => {},
highlight: (e: HTMLElement) => void,
options: Partial<Options> = {}
) {
const opts: Options = {
Expand Down

0 comments on commit ee2cf74

Please sign in to comment.