Skip to content

Commit

Permalink
fixup! fix(experimental-utils): support immutable members
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelss95 committed Sep 5, 2021
1 parent 5e8f9b3 commit 1c867cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/ast-spec/src/base/Range.ts
Expand Up @@ -3,4 +3,4 @@
* Both numbers are a 0-based index which is the position in the array of source code characters.
* The first is the start position of the node, the second is the end position of the node.
*/
export type Range = readonly [number, number];
export type Range = [number, number];
10 changes: 5 additions & 5 deletions packages/experimental-utils/src/ts-eslint/Rule.ts
Expand Up @@ -81,7 +81,7 @@ interface RuleMetaData<TMessageIds extends string> {
}

interface RuleFix {
range: AST.Range;
range: Readonly<AST.Range>;
text: string;
}

Expand All @@ -91,25 +91,25 @@ interface RuleFixer {
text: string,
): RuleFix;

insertTextAfterRange(range: AST.Range, text: string): RuleFix;
insertTextAfterRange(range: Readonly<AST.Range>, text: string): RuleFix;

insertTextBefore(
nodeOrToken: TSESTree.Node | TSESTree.Token,
text: string,
): RuleFix;

insertTextBeforeRange(range: AST.Range, text: string): RuleFix;
insertTextBeforeRange(range: Readonly<AST.Range>, text: string): RuleFix;

remove(nodeOrToken: TSESTree.Node | TSESTree.Token): RuleFix;

removeRange(range: AST.Range): RuleFix;
removeRange(range: Readonly<AST.Range>): RuleFix;

replaceText(
nodeOrToken: TSESTree.Node | TSESTree.Token,
text: string,
): RuleFix;

replaceTextRange(range: AST.Range, text: string): RuleFix;
replaceTextRange(range: Readonly<AST.Range>, text: string): RuleFix;
}

type ReportFixFunction = (
Expand Down

0 comments on commit 1c867cd

Please sign in to comment.