Skip to content

Commit d07d83d

Browse files
authored
Fix a few typos in doc comments
1 parent 1b2cba7 commit d07d83d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/main.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface JSONScanner {
6666
*/
6767
getToken(): SyntaxKind;
6868
/**
69-
* Returns the last read token value. The value for strings is the decoded string content. For numbers its of type number, for boolean it's true or false.
69+
* Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false.
7070
*/
7171
getTokenValue(): string;
7272
/**
@@ -91,7 +91,7 @@ export const getLocation: (text: string, position: number) => Location = parser.
9191

9292
/**
9393
* Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
94-
* Therefore always check the errors list to find out if the input was valid.
94+
* Therefore, always check the errors list to find out if the input was valid.
9595
*/
9696
export const parse: (text: string, errors?: ParseError[], options?: ParseOptions) => any = parser.parse;
9797

@@ -106,7 +106,7 @@ export const parseTree: (text: string, errors?: ParseError[], options?: ParseOpt
106106
export const findNodeAtLocation: (root: Node, path: JSONPath) => Node | undefined = parser.findNodeAtLocation;
107107

108108
/**
109-
* Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.
109+
* Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.
110110
*/
111111
export const findNodeAtOffset: (root: Node, offset: number, includeRightBound?: boolean) => Node | undefined = parser.findNodeAtOffset;
112112

@@ -200,14 +200,14 @@ export interface Location {
200200
*/
201201
previousNode?: Node;
202202
/**
203-
* The path describing the location in the JSON document. The path consists of a sequence strings
203+
* The path describing the location in the JSON document. The path consists of a sequence of strings
204204
* representing an object property or numbers for array indices.
205205
*/
206206
path: JSONPath;
207207
/**
208208
* Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices).
209-
* '*' will match a single segment, of any property name or index.
210-
* '**' will match a sequece of segments or no segment, of any property name or index.
209+
* '*' will match a single segment of any property name or index.
210+
* '**' will match a sequence of segments of any property name or index, or no segment.
211211
*/
212212
matches: (patterns: JSONPath) => boolean;
213213
/**
@@ -302,7 +302,7 @@ export interface Range {
302302

303303
export interface FormattingOptions {
304304
/**
305-
* If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent?
305+
* If indentation is based on spaces (`insertSpaces` = true), the number of spaces that make an indent.
306306
*/
307307
tabSize?: number;
308308
/**
@@ -325,7 +325,7 @@ export interface FormattingOptions {
325325
* removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of
326326
* text in the original document. However, multiple edits can have
327327
* the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.
328-
* To apply edits to an input, you can use `applyEdits`
328+
* To apply edits to an input, you can use `applyEdits`.
329329
*/
330330
export function format(documentText: string, range: Range | undefined, options: FormattingOptions): Edit[] {
331331
return formatter.format(documentText, range, options);
@@ -340,7 +340,7 @@ export interface ModificationOptions {
340340
*/
341341
formattingOptions: FormattingOptions;
342342
/**
343-
* Optional fucntion to define the insertion index given an existing list of properties.
343+
* Optional function to define the insertion index given an existing list of properties.
344344
*/
345345
getInsertionIndex?: (properties: string[]) => number;
346346
}
@@ -358,7 +358,7 @@ export interface ModificationOptions {
358358
* removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of
359359
* text in the original document. However, multiple edits can have
360360
* the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.
361-
* To apply edits to an input, you can use `applyEdits`
361+
* To apply edits to an input, you can use `applyEdits`.
362362
*/
363363
export function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): Edit[] {
364364
return edit.setProperty(text, path, value, options.formattingOptions, options.getInsertionIndex);
@@ -372,4 +372,4 @@ export function applyEdits(text: string, edits: Edit[]): string {
372372
text = edit.applyEdit(text, edits[i]);
373373
}
374374
return text;
375-
}
375+
}

0 commit comments

Comments
 (0)