chore(web): fix indentation in type files

This commit is contained in:
RedCMD 2025-07-14 22:50:04 +12:00 committed by GitHub
parent 42e2bba8d6
commit 912167a9cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 114 additions and 114 deletions

View file

@ -83,8 +83,8 @@ export const ZERO_POINT: Point = { row: 0, column: 0 };
export type ParseCallback = (index: number, position: Point) => string | undefined;
/**
* A callback that receives the parse state during parsing.
*/
* A callback that receives the parse state during parsing.
*/
export type ProgressCallback = (progress: ParseState) => boolean;
/**

View file

@ -1,60 +1,60 @@
declare module 'web-tree-sitter' {
/**
* A position in a multi-line text document, in terms of rows and columns.
*
* Rows and columns are zero-based.
*/
export interface Point {
/** The zero-based row number. */
row: number;
/** The zero-based column number. */
column: number;
}
/**
* A range of positions in a multi-line text document, both in terms of bytes
* and of rows and columns.
*/
export interface Range {
/** The start position of the range. */
startPosition: Point;
/** The end position of the range. */
endPosition: Point;
/** The start index of the range. */
startIndex: number;
/** The end index of the range. */
endIndex: number;
}
/**
* A summary of a change to a text document.
*/
export interface Edit {
/** The start position of the change. */
startPosition: Point;
/** The end position of the change before the edit. */
oldEndPosition: Point;
/** The end position of the change after the edit. */
newEndPosition: Point;
/** The start index of the change. */
startIndex: number;
/** The end index of the change before the edit. */
oldEndIndex: number;
/** The end index of the change after the edit. */
newEndIndex: number;
}
/**
* A callback for parsing that takes an index and point, and should return a string.
*/
export type ParseCallback = (index: number, position: Point) => string | undefined;
/**
* A callback that receives the parse state during parsing.
*/
export type ProgressCallback = (progress: ParseState) => boolean;
/**
* A callback for logging messages.
*
* If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser.
*/
export type LogCallback = (message: string, isLex: boolean) => void;
/**
* A position in a multi-line text document, in terms of rows and columns.
*
* Rows and columns are zero-based.
*/
export interface Point {
/** The zero-based row number. */
row: number;
/** The zero-based column number. */
column: number;
}
/**
* A range of positions in a multi-line text document, both in terms of bytes
* and of rows and columns.
*/
export interface Range {
/** The start position of the range. */
startPosition: Point;
/** The end position of the range. */
endPosition: Point;
/** The start index of the range. */
startIndex: number;
/** The end index of the range. */
endIndex: number;
}
/**
* A summary of a change to a text document.
*/
export interface Edit {
/** The start position of the change. */
startPosition: Point;
/** The end position of the change before the edit. */
oldEndPosition: Point;
/** The end position of the change after the edit. */
newEndPosition: Point;
/** The start index of the change. */
startIndex: number;
/** The end index of the change before the edit. */
oldEndIndex: number;
/** The end index of the change after the edit. */
newEndIndex: number;
}
/**
* A callback for parsing that takes an index and point, and should return a string.
*/
export type ParseCallback = (index: number, position: Point) => string | undefined;
/**
* A callback that receives the parse state during parsing.
*/
export type ProgressCallback = (progress: ParseState) => boolean;
/**
* A callback for logging messages.
*
* If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser.
*/
export type LogCallback = (message: string, isLex: boolean) => void;
/**
* Options for parsing
*

View file

@ -1,60 +1,60 @@
declare module 'web-tree-sitter' {
/**
* A position in a multi-line text document, in terms of rows and columns.
*
* Rows and columns are zero-based.
*/
export interface Point {
/** The zero-based row number. */
row: number;
/** The zero-based column number. */
column: number;
}
/**
* A range of positions in a multi-line text document, both in terms of bytes
* and of rows and columns.
*/
export interface Range {
/** The start position of the range. */
startPosition: Point;
/** The end position of the range. */
endPosition: Point;
/** The start index of the range. */
startIndex: number;
/** The end index of the range. */
endIndex: number;
}
/**
* A summary of a change to a text document.
*/
export interface Edit {
/** The start position of the change. */
startPosition: Point;
/** The end position of the change before the edit. */
oldEndPosition: Point;
/** The end position of the change after the edit. */
newEndPosition: Point;
/** The start index of the change. */
startIndex: number;
/** The end index of the change before the edit. */
oldEndIndex: number;
/** The end index of the change after the edit. */
newEndIndex: number;
}
/**
* A callback for parsing that takes an index and point, and should return a string.
*/
export type ParseCallback = (index: number, position: Point) => string | undefined;
/**
* A callback that receives the parse state during parsing.
*/
export type ProgressCallback = (progress: ParseState) => boolean;
/**
* A callback for logging messages.
*
* If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser.
*/
export type LogCallback = (message: string, isLex: boolean) => void;
/**
* A position in a multi-line text document, in terms of rows and columns.
*
* Rows and columns are zero-based.
*/
export interface Point {
/** The zero-based row number. */
row: number;
/** The zero-based column number. */
column: number;
}
/**
* A range of positions in a multi-line text document, both in terms of bytes
* and of rows and columns.
*/
export interface Range {
/** The start position of the range. */
startPosition: Point;
/** The end position of the range. */
endPosition: Point;
/** The start index of the range. */
startIndex: number;
/** The end index of the range. */
endIndex: number;
}
/**
* A summary of a change to a text document.
*/
export interface Edit {
/** The start position of the change. */
startPosition: Point;
/** The end position of the change before the edit. */
oldEndPosition: Point;
/** The end position of the change after the edit. */
newEndPosition: Point;
/** The start index of the change. */
startIndex: number;
/** The end index of the change before the edit. */
oldEndIndex: number;
/** The end index of the change after the edit. */
newEndIndex: number;
}
/**
* A callback for parsing that takes an index and point, and should return a string.
*/
export type ParseCallback = (index: number, position: Point) => string | undefined;
/**
* A callback that receives the parse state during parsing.
*/
export type ProgressCallback = (progress: ParseState) => boolean;
/**
* A callback for logging messages.
*
* If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser.
*/
export type LogCallback = (message: string, isLex: boolean) => void;
/**
* Options for parsing
*