Skip to content

Commit

Permalink
fix(create-fixed-array): types
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Aug 13, 2023
1 parent fa751a9 commit 517dc5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/create-fixed-array/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const arrayMap: Record<number, readonly unknown[]> = {};
const arrayMap: Record<number, readonly number[]> = {};

export const createFixedArray = (length: number): readonly unknown[] => {
export const createFixedArray = (length: number): readonly number[] => {
arrayMap[length] ||= arrayMap[length] || Array.from(Array(length).keys());
return arrayMap[length];
};

0 comments on commit 517dc5c

Please sign in to comment.