Skip to content

Commit 0495799

Browse files
committed
style(ts comments): remove "ts-expect-error" comment in favour of improved function guard
1 parent be34129 commit 0495799

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ function _makeMatrix<D extends number, T>(
9191
currentPosition[currentDimension] = i;
9292
return needsRecursion
9393
? _makeMatrix(remainingDimensions, initialValues, currentPosition)
94-
: typeof initialValues === "function" // @ts-expect-error: "expression is not callable" https://github.com/microsoft/TypeScript/issues/37663
95-
? initialValues(currentPosition.slice())
94+
: initialValues instanceof Function
95+
? initialValues(currentPosition.slice() as Vector<D>)
9696
: initialValues;
9797
});
9898

0 commit comments

Comments
 (0)