How can I fix this error when I building project
Unanswered
MyMy posted this in #help-forum
MyMyOP
Property 'toSpliced' does not exist on type. Did you mean 'splice'?When I building product it show me this. How can I fix this error
23 Replies
Yacare Caiman
do you have this uploaded on github ??
MyMyOP
yeah I have
but it private repo
Yacare Caiman
oh ok keep it that way then
try putting the
dndImg?.toSpliced() that we talked about and run buildmaybe it works
MyMyOP
Property 'toSpliced' does not exist on type '{ image: string; index: number; }[]'. Did you mean 'splice'?
148 | // );
149 | // setDndImg(dndCopy);
> 150 | const itemsAfter = dndImg?.toSpliced(index, 1);still er
I think the problem is lib in ts.config
"lib": [
"dom",
"dom.iterable",
"esnext",
"es2023"
],
"dom",
"dom.iterable",
"esnext",
"es2023"
],
here's my lib
But how strange I still get that err
Maybe this? https://stackoverflow.com/a/76443571
MyMyOP
no
I'm using 20.3.1
Try installing newest versions of types/node and typescript
If not working, try newest beta versions if available
MyMyOP
ok I'll try that
Yes, it will only be available in typescript 5.2