You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an application that depends on ng-recaptcha has tsconfig.json
"strictNullChecks": true
the `Parameters<T>` utility type fails if the type parameter allows `undefined`.
ClosesDethAriel#211
When an application that depends on ng-recaptcha has tsconfig.json
"strictNullChecks": true
the `Parameters<T>` utility type fails if the type parameter allows `undefined`.
Closes#211
Summary
I'm submitting a:
Description
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/f17491e0d087ae9ba39cfcc961f1952016b20e75/types/grecaptcha/index.d.ts#L125 defines error callback as
(): void
(this is probably wrong but I am unable to find any documentation to correct it to submit the PR to DT) but the member"error-callback"
is optional so its type includesundefined
.https://github.com/DethAriel/ng-recaptcha/blob/master/src/recaptcha/recaptcha.component.ts#L22-L24 uses this definition.
When the project is included in a project that builds with tsconfig:
the above error occurs.
To simplify:
https://www.typescriptlang.org/play?#code/HYQwtgpgzgDiDGEAEAlCBhEMAu8AWIAagExIDeAUEtUhAB4wD2ATtkgJbDYTMBmCyAAohm4CN2ZRyVGrIBEPZiwC08EABt1AIwQBrOQH4AFAEoAXEgBujdgBMA3DOoBfCq4rYAnjGRo1OfBAAUWYlZmFRSAkpAF4kCLFogB40TACCEgA6BKieKABtBVCVNU0deH0AXQA+eyA
open tsconfig and toggle strictNullChecks to see the error
Lib versions:
tsc --version
): 4.1.3The text was updated successfully, but these errors were encountered: