I use the fill function first
const range = new Array(layernum.length).fill(NaN);//[ts] Property 'fill' does not exist on type 'any[]'
to solve this problem, I use
const range = new Int32Array(layernum.length).fill(NaN);
instead
while it causes another problem
let layer = range.map(e => range.map(e => e));
so how to use prototype in typescript
source
share