Type 'void' is not assignable to type 'Promise<any>'. on authorizeOnServer example
See original GitHub issueHi!, using copy paste for example of authorizeOnServer, console return
Type '(approveData: IOnApproveCallbackData) => void' is not assignable to type '(data: IOnApproveCallbackData, actions: any) => Promise<any>'.
Type 'void' is not assignable to type 'Promise<any>'.
what is wrong?
Regards!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Type Promise<void> is not assignable to type ... - Stack Overflow
You are not returning anything inside your then which makes jobs be of type Promise<void> . Return the array inside then :
Read more >Type 'void' is not assignable to type Promise<Note[]> - ionic-v3
I have this error and the errors show like TypeScript error: Type 'void' is not assignable to type Promise<Note[]> .
Read more >Microsoft/TypeScript - Gitter
Type '<U>(onFulFill: (result: IUserDocument) => void, onReject?: (err: any) => void) => Promise<U>' is not assignable to type '{ <TResult>(onfulfilled?:
Read more >CustomStore - The "Promise<Object> is not assignable to type ...
Hello I use a datagrid with an underlying customstore with following code : data: any = {}; this.data = new CustomStore({ key: ['id....
Read more >Promise<T> returned by conditional type : r/typescript - Reddit
Type 'Promise<TQueryFnData>' is not assignable to type '[TQueryFnData] extends [undefined] ? "queryFn must not return undefined or void" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Finally, I’ve modify example :
And error disappear.
Thanks 😉.
Sorry!, in the example
My code
I don’t see the difference, what I missing?
Thanks you!