8000 Updated typings for projects with strictNullChecks by deskoh · Pull Request #1941 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

Updated typings for projects with strictNullChecks#1941

Merged
daffl merged 3 commits intofeathersjs:masterfrom
deskoh:pr5
May 5, 2020
Merged

Updated typings for projects with strictNullChecks#1941
daffl merged 3 commits intofeathersjs:masterfrom
deskoh:pr5

Conversation

@deskoh
Copy link
Contributor
@deskoh deskoh commented May 1, 2020

This updates the generated typings for getRedirect from:

getRedirect(data: AuthenticationResult | Error, params?: Params): Promise<string>;

to

getRedirect(data: AuthenticationResult | Error, params?: Params): Promise<string | null>;

TypeScript projects using strictNullChecks that overrides getRedirect will not allow null to be returned using the original typings.

@deskoh deskoh changed the title Added strictNullChecks to improve generated typings Updated typings for projects with strictNullChecks May 3, 2020
@deskoh
Copy link
Contributor Author
deskoh commented May 3, 2020

Simplified the PR by specifying the return type explicitly. Should be backwards compatible for projects without strictNullChecks.

@daffl daffl merged commit be91206 into feathersjs:master May 5, 2020
@daffl
Copy link
Member
daffl commented May 5, 2020

Makes sense, thank you!

EliSadaka pushed a commit to yusernetwork/authentication-oauth that referenced this pull request Oct 20, 2020
…llChecks (feathersjs#1941)

Co-authored-by: David Luecke <daff@neyeon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0