Skip to content

Commit

Permalink
chore: Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Jul 15, 2024
1 parent b5971b4 commit 8d0625f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/reconcile/keyed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const longestPositiveIncreasingSubsequence = (
ns: number[],
newStart: number,
) => {
const seq = [];
const is = [];
const seq: number[] = [];
const is: number[] = [];
const pre = new Array<number>(ns.length);
const len = ns.length;
let i = newStart;
Expand Down Expand Up @@ -243,7 +243,7 @@ export const reconcile = <T, N extends Node>(
for (let i = newStart; i <= newEnd; i++) I.set(data[i][key], i);

let reusingNodes = newStart + dataLen - 1 - newEnd;
const toRemove = [];
const toRemove: number[] = [];

for (let i = prevStart; i <= prevEnd; i++) {
if (I.has(renderedData[i][key])) {
Expand Down Expand Up @@ -291,7 +291,7 @@ export const reconcile = <T, N extends Node>(
const longestSeq = longestPositiveIncreasingSubsequence(P, newStart);

// Collect nodes to work with them
const nodes = [];
const nodes: (Node | null)[] = [];
let tmpC = prevStartNode;
for (let i = prevStart; i <= prevEnd; i++) {
nodes[i] = tmpC;
Expand Down
8 changes: 4 additions & 4 deletions src/reconcile/non-keyed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const longestPositiveIncreasingSubsequence = (
ns: number[],
newStart: number,
) => {
const seq = [];
const is = [];
const seq: number[] = [];
const is: number[] = [];
const pre = new Array<number>(ns.length);
const len = ns.length;
let i = newStart;
Expand Down Expand Up @@ -238,7 +238,7 @@ export const reconcile = <T, N extends Node>(
for (let i = newStart; i <= newEnd; i++) I.set(data[i], i);

let reusingNodes = newStart + data.length - 1 - newEnd;
const toRemove = [];
const toRemove: number[] = [];

for (let i = prevStart; i <= prevEnd; i++) {
if (I.has(renderedData[i])) {
Expand Down Expand Up @@ -286,7 +286,7 @@ export const reconcile = <T, N extends Node>(
const longestSeq = longestPositiveIncreasingSubsequence(P, newStart);

// Collect nodes to work with them
const nodes = [];
const nodes: (Node | null)[] = [];
let tmpC = prevStartNode;
for (let i = prevStart; i <= prevEnd; i++) {
nodes[i] = tmpC;
Expand Down

0 comments on commit 8d0625f

Please sign in to comment.