File: types.d.ts

package info (click to toggle)
node-locate-character 2.0.5%2Brepack-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 168 kB
  • sloc: javascript: 69; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
interface Options {
	offsetLine?: number
	offsetColumn?: number
	startIndex?: number
}

export interface Location {
	line: number
	column: number
	character: number
}

export function locate ( source: string, search: string, options?: Options ): Location
export function locate ( source: string, search: number, options?: Options ): Location

export function getLocator ( source: string, options?: Options ): ( search: string, startIndex?: number ) => Location
export function getLocator ( source: string, options?: Options ): ( search: number ) => Location