Versions
array-flatten version: 2.1.0
typescript version: 2.1.5
Problem
When I try to compile the following example
import * as flatten from 'array-flatten';
const arr = flatten.depth<number>([[[1, 2]]], 1);
arr.push(1);
I get the error:
index.ts(4,5): error TS2339: Property 'push' does not exist on type 'NestedArray<number>'.
Expected behavior
No errors. NestedArray interface has methods from Array. Maybe define NestedArray like this:
interface NestedArray<T> extends Array<T | NestedArray<T>> {}
?