We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a9896a commit 6d8c51fCopy full SHA for 6d8c51f
src/index.d.ts
@@ -1,7 +1,7 @@
1
// we use numeric literal types for length as TS 2.7 does for fixed size tuples
2
// N is the length of the array
3
// T is the type of array elements
4
-// M is a dummy type inizialized to '0', we need it to trick the compiler
5
-export type FixedSizeArray<N extends number, T, M extends string = '0'> = {
6
- [k in M]: any;
7
-} & { length: N } & ReadonlyArray<T>;
+export type FixedSizeArray<N extends number, T> = {
+ 0: any;
+ length: N;
+} & ReadonlyArray<T>;
0 commit comments