Skip to content

Commit b69be67

Browse files
committed
Use ReadonlyArray for TypeScript interface
1 parent 00e3dc6 commit b69be67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array-flatten.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
declare function flatten <T> (array: flatten.NestedArray<T>): T[];
22

33
declare namespace flatten {
4-
export interface NestedArray <T> extends Array<T | NestedArray<T>> {}
4+
export interface NestedArray <T> extends ReadonlyArray<T | NestedArray<T>> {}
55

66
export interface NestedList <T> {
77
[index: number]: T | NestedList<T>;

0 commit comments

Comments
 (0)