Argument of type '({ done, value }: { done: boolean; value: any; }) => void' is not assignable to parameter of type '(value: ReadableStreamReadResult<any>) => void | PromiseLike<void>' #395
Which seems ok.... (I didn't change anything)
But I get this error:
ERROR in /home/marco/webMatters/electronMatters/GGC-Electron/src/NodeReadable.ts(30,13):
30:13 Argument of type '({ done, value }: { done: boolean; value: any; }) => void' is not assignable to parameter of type '(value:
ReadableStreamReadResult) => void | PromiseLike'.
Types of parameters '__0' and 'value' are incompatible.
Type 'ReadableStreamReadResult' is not assignable to type '{ done: boolean; value: any; }'.
Type 'ReadableStreamReadDoneResult' is not assignable to type '{ done: boolean; value: any; }'.
Property 'value' is optional in type 'ReadableStreamReadDoneResult' but required in type '{ done: boolean; value:
any; }'.
28 | this.reader
29 | .read()
30 | .then(({ done, value }: { done: boolean; value: any }) => {
| ^
31 | if (done) {
32 | this.push(null)
33 | return
I'm transposing/translating pushpin into electron-vue
nano src/services/p2p/hyperfile.ts :
nano src/NodeReadable.ts :
Which seems ok.... (I didn't change anything) But I get this error:
ERROR in /home/marco/webMatters/electronMatters/GGC-Electron/src/NodeReadable.ts(30,13): 30:13 Argument of type '({ done, value }: { done: boolean; value: any; }) => void' is not assignable to parameter of type '(value:) => void | PromiseLike'.
Types of parameters '__0' and 'value' are incompatible.
Type 'ReadableStreamReadResult' is not assignable to type '{ done: boolean; value: any; }'.
Type 'ReadableStreamReadDoneResult' is not assignable to type '{ done: boolean; value: any; }'.
Property 'value' is optional in type 'ReadableStreamReadDoneResult' but required in type '{ done: boolean; value:
any; }'.
28 | this.reader
29 | .read()
ReadableStreamReadResult
This is tsconfig.json :