Skip to content

Commit 787633d

Browse files
dwrthsvozza
andauthored
refactor(jmespath): fix code quality issues (#4286)
Co-authored-by: David <[email protected]> Co-authored-by: Stefano Vozza <[email protected]>
1 parent fd600cc commit 787633d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/jmespath/src/Lexer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class Lexer {
8181
*
8282
* @param current The current character
8383
*/
84-
#consumeComparatorSigns = (
84+
readonly #consumeComparatorSigns = (
8585
current: '<' | '>' | '!' | '=' | '|' | '&'
8686
): Token => {
8787
switch (current) {

packages/jmespath/src/Parser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { ParsedResult } from './ParsedResult.js';
3030
import type { Node, Token } from './types.js';
3131

3232
/**
33-
* Top down operaotr precedence parser for JMESPath.
33+
* Top down operator precedence parser for JMESPath.
3434
*
3535
* ## References
3636
* The implementation of this Parser is based on the implementation of
@@ -48,15 +48,15 @@ class Parser {
4848
* The maximum binding power for a token
4949
* that can stop a projection.
5050
*/
51-
#projectionStop = 10;
51+
readonly #projectionStop = 10;
5252
/**
5353
* Cache object
5454
*/
5555
#cache: Record<string, ParsedResult> = {};
5656
/**
5757
* The maximum size of the cache.
5858
*/
59-
#maxCacheSize = 128;
59+
readonly #maxCacheSize = 128;
6060
#tokenizer?: Lexer;
6161
#tokens: Token[];
6262
#index = 0;

packages/jmespath/src/TreeInterpreter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { isTruthy, sliceArray } from './utils.js';
2525
* @internal
2626
*/
2727
class TreeInterpreter {
28-
#functions: Functions;
28+
readonly #functions: Functions;
2929

3030
/**
3131
* @param options The options to use for the interpreter.

0 commit comments

Comments
 (0)