Incomplete type definition for signInFailure callback return value (TypeScript)
See original GitHub issueThe documentation says that the valid return type for signInFailure callback is Promise<void>|void
but the type definition defines only Promise<void>
.
Describe your environment
- Operating System version: Linux
- IDE: Visual Studio Code 1.50.1
- TypeScript: 3.9.7
- Firebase UI version: 4.7.0 (via react-firebaseui 4.1.0)
- Firebase SDK version: 7.24.0
Steps to reproduce:
Write the following code in IDE:
const firebaseUiConfig: firebaseui.auth.Config = {
callbacks: {
signInFailure: (error) => {
console.log("failure");
},
}
};
Expected result:
No errors.
Actual result:
IDE gives error:
Type '(error: AuthUIError) => void' is not assignable to type '(error: AuthUIError) => Promise<void>'.
Type 'void' is not assignable to type 'Promise<void>'.ts(2322)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
What is the best way to deal with Typescript incomplete type ...
d.ts type definition files, there are some methods or functions that I want to use missing in the definition. What is the best...
Read more >microsoft/microsoft-graph-types - UNPKG
1, // Project: https://github.com/microsoftgraph/msgraph-typescript-typings. 2, // Definitions by: Microsoft Graph Team <https://github.com/microsoftgraph>.
Read more >TypeScript - Declare a function callback type - Trung Vo
To define the function callback type. You could declare an interface that has a call signature. Or define a new type.
Read more >https://raw.githubusercontent.com/microsoftgraph/m...
Project: https://github.com/microsoftgraph/msgraph-typescript-typings ... The value none means that no action has been performed on the user * or sign-in so ...
Read more >Error using WifiNetDevice::SetReceiveCallback - Google Groups
I'm getting this error when trying to setup a callback function for a WifiNetDevice using ... ns3/make-event.h:124:7: error: incomplete type ...
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 Free
Top 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
Oops, this slipped through the cracks. Sorry about that. The fix is merged. We will push the release next week with the fix. FYI: @xil222
@Rafarel Just return an empty Promise