Skip to content

Commit 88795e2

Browse files
Fixed lints.
1 parent 35a3a5f commit 88795e2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/services/refactors/convertStringOrTemplateLiteral.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
1010

1111
registerRefactor(refactorName, { getEditsForAction, getAvailableActions });
1212

13-
function getAvailableActions(context: RefactorContext): ReadonlyArray<ApplicableRefactorInfo> {
13+
function getAvailableActions(context: RefactorContext): readonly ApplicableRefactorInfo[] {
1414
const { file, startPosition } = context;
1515
const node = getNodeOrParentOfParentheses(file, startPosition);
1616
const maybeBinary = getParentBinaryExpression(node);
@@ -123,7 +123,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
123123
return expr;
124124
}
125125

126-
function makeSingleExpressionOrBinary(nodes: ReadonlyArray<Expression>): Expression {
126+
function makeSingleExpressionOrBinary(nodes: readonly Expression[]): Expression {
127127
if (nodes.length > 1) {
128128
const left = nodes[0];
129129
const right = nodes[1];
@@ -135,7 +135,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
135135
return nodes[0];
136136
}
137137

138-
function arrayToTree(nodes: ReadonlyArray<Expression>, index: number, accumulator: BinaryExpression): Expression {
138+
function arrayToTree(nodes: readonly Expression[], index: number, accumulator: BinaryExpression): Expression {
139139
if (nodes.length === index) return accumulator;
140140

141141
const right = nodes[index];
@@ -178,7 +178,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
178178

179179
// to copy comments following the string
180180
// "foo" /* comment */ + "bar" /* comment */ + "bar2"
181-
const copyCommentFromMultiNode = (nodes: ReadonlyArray<Expression>, file: SourceFile, copyOperatorComments: (index: number, targetNode: Node) => void) =>
181+
const copyCommentFromMultiNode = (nodes: readonly Expression[], file: SourceFile, copyOperatorComments: (index: number, targetNode: Node) => void) =>
182182
(indexes: number[], targetNode: Node) => {
183183
while (indexes.length > 0) {
184184
const index = indexes.shift()!;
@@ -187,7 +187,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
187187
}
188188
};
189189

190-
function concatConsecutiveString(index: number, nodes: ReadonlyArray<Expression>): [number, string, number[]] {
190+
function concatConsecutiveString(index: number, nodes: readonly Expression[]): [number, string, number[]] {
191191
let text = "";
192192
const indexes = [];
193193

@@ -202,7 +202,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
202202
return [index, text, indexes];
203203
}
204204

205-
function nodesToTemplate({nodes, operators}: {nodes: ReadonlyArray<Expression>, operators: Token<BinaryOperator>[]}, file: SourceFile) {
205+
function nodesToTemplate({nodes, operators}: {nodes: readonly Expression[], operators: Token<BinaryOperator>[]}, file: SourceFile) {
206206
const copyOperatorComments = copyTrailingOperatorComments(operators, file);
207207
const copyCommentFromStringLiterals = copyCommentFromMultiNode(nodes, file, copyOperatorComments);
208208
const [begin, headText, headIndexes] = concatConsecutiveString(0, nodes);

0 commit comments

Comments
 (0)