deno_gl icon indicating copy to clipboard operation
deno_gl copied to clipboard

got a TS error when running examples/three.js

Open mindon opened this issue 3 years ago • 0 comments

error: TS2344 [ERROR]: Type 'T["parameters"]' does not satisfy the constraint 'NativeType[]'. The type 'readonly NativeType[]' is 'readonly' and cannot be assigned to the mutable type 'NativeType[]'. ...args: MapParameters<T["parameters"]>

src/core/util.ts:39:26

deno version

deno 1.19.3 (release, x86_64-unknown-linux-gnu) v8 9.9.115.8 typescript 4.5.2

using export type MapParameters<T extends Readonly<Deno.NativeType[]>> instead to remove the error

mindon avatar Mar 14 '22 05:03 mindon