Skip to content

Commit

Permalink
Bring ts lint nits up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Jul 27, 2022
1 parent 3eb51cb commit 01760d4
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions lib/peg.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,26 +363,14 @@ export class GrammarLocation {
* The original grammarSource. Should be a string or have a toString()
* method.
*/
source: any;
public source: any;

/**
* The starting offset for the grammar in the larger file.
*/
start: Location;

constructor(source: any, start: Location);
public start: Location;

toString(): string;

/**
* Return a new Location offset from the given location by the start of the
* grammar.
*
* @param loc The location as if the start of the grammar was the start of
* the file.
* @returns The offset location.
*/
offset(loc: Location): Location;
public constructor(source: unknown, start: Location);

/**
* If the range has a grammarSource that is a GrammarLocation, offset the
Expand All @@ -391,16 +379,28 @@ export class GrammarLocation {
* @param range The range to extract from.
* @returns The offset start if possible, or the original start.
*/
static offsetStart(range: LocationRange): Location;
public static offsetStart(range: LocationRange): Location;

/**
* If the range has a grammarSource that is a GrammarLocation, offset the
* end of that range by the GrammarLocation.
* If the range has a grammarSource that is a GrammarLocation, offset the
* end of that range by the GrammarLocation.
*
* @param range The range to extract from.
* @returns The offset end if possible, or the original end.
*/
public static offsetEnd(range: LocationRange): Location;

public toString(): string;

/**
* Return a new Location offset from the given location by the start of the
* grammar.
*
* @param range The range to extract from.
* @returns The offset end if possible, or the original end.
* @param loc The location as if the start of the grammar was the start of
* the file.
* @returns The offset location.
*/
static offsetEnd(range: LocationRange): Location;
public offset(loc: Location): Location;
}

export namespace parser {
Expand Down

0 comments on commit 01760d4

Please sign in to comment.