Skip to content

Commit

Permalink
feat: add export to Positions type
Browse files Browse the repository at this point in the history
  • Loading branch information
raiindev committed Nov 7, 2023
1 parent b018412 commit 2ec4011
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,7 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# IDEA
.idea

# End of https://www.toptal.com/developers/gitignore/api/node,osx,windows,linux
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ export interface HighlightOptions {
HTMLTag?: string
CSSClass?: string
}
export type Position = { start: number, end: number }

type Positions = Array<{ start: number, end: number }>
type Positions = Position[]

const defaultOptions: HighlightOptions = {
caseSensitive: false,
Expand Down

0 comments on commit 2ec4011

Please sign in to comment.