Skip to content

Commit

Permalink
fix: Fixes TS definition
Browse files Browse the repository at this point in the history
Update changelog

OKTA-412079
<<<Jenkins Check-In of Tested SHA: b47a9bc for [email protected]>>>
Artifact: okta-react-native
Files changed count: 3
PR Link: "#158"
  • Loading branch information
oleggnidets-okta authored and eng-prod-CI-bot-okta committed Jul 19, 2021
1 parent 4e6c2b6 commit b8dfa2f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.12.1

### Bug Fix

- [#158](https://github.com/okta/okta-react-native/pull/158) Fixes TS definition for `authenticate` method

# 1.12.0

### Feature
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function signInWithBrowser(
): Promise<Okta.AuthenticationResponse>;

export function authenticate(
sessionToken: string
{ sessionToken }: { sessionToken: string }
): Promise<Okta.AuthenticationResponse>;

export function signOut(): Promise<{ resolve_type: string }>;
Expand Down
2 changes: 1 addition & 1 deletion types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.signInWithBrowser({ idp

expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.signInWithBrowser({ noSSO: true }));

expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.authenticate('{sessionToken}'));
expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.authenticate({ sessionToken: 'sessionToken' }));

expectType<Promise<{ resolve_type: string; }>>(OktaSDK.signOut());

Expand Down

0 comments on commit b8dfa2f

Please sign in to comment.