Skip to content

docs: correct onSuccess JSDoc + receivedRedirectUri type docs#399

Open
tsushanth wants to merge 1 commit into
plaid:masterfrom
tsushanth:fix/onsuccess-jsdoc-and-redirect-uri-docs
Open

docs: correct onSuccess JSDoc + receivedRedirectUri type docs#399
tsushanth wants to merge 1 commit into
plaid:masterfrom
tsushanth:fix/onsuccess-jsdoc-and-redirect-uri-docs

Conversation

@tsushanth

Copy link
Copy Markdown

Summary

Two small documentation fixes filed as separate issues but touching adjacent surfaces — combined into a single PR.

1. CommonPlaidLinkOptions.onSuccess JSDoc (closes #397)

src/types/index.ts:92-93 referenced public_key and had a connecter/connected typo. The first callback argument is public_token since the Link Token migration; public_key is the deprecated public-key auth flow and is no longer what consumers receive here. The matching PlaidLinkOnSuccess type already uses public_token.

-  // A function that is called when a user has successfully connecter an Item.
-  // The function should expect two arguments, the public_key and a metadata object
+  // A function that is called when a user has successfully connected an Item.
+  // The function should expect two arguments, the public_token and a metadata object
   onSuccess: T;

The other surviving public_key references in this file are inside the PlaidLinkOptionsWithPublicKey interface, which is the deprecated public-key flow — those are intentional and left untouched.

2. receivedRedirectUri README/type mismatch (closes #398)

README.md:87 documented receivedRedirectUri as string | null | undefined, but the type at src/types/index.ts:156 only permits string | undefined. Updated the README to match the type — that's the minimal, lower-risk path; widening the type would change the runtime contract.

-| `receivedRedirectUri` | `string \| null \| undefined`                                                             |
+| `receivedRedirectUri` | `string \| undefined`                                                                     |

Test plan

  • Comment-only / docs-only change — no runtime behavior change
  • PlaidLinkOnSuccess type already uses public_token, so JSDoc now matches the type
  • receivedRedirectUri type unchanged; README now matches it

Two small documentation fixes filed as separate issues but touching
adjacent surfaces:

- `CommonPlaidLinkOptions.onSuccess` JSDoc (`src/types/index.ts:92-93`)
  referenced `public_key` and had a `connecter`/`connected` typo. The
  actual first callback argument is `public_token` since the Link Token
  migration; `public_key` is the deprecated public-key auth flow and is
  no longer what consumers receive here. The matching
  `PlaidLinkOnSuccess` type already uses `public_token`.

- `README.md:87` documented `receivedRedirectUri` as
  `string | null | undefined`, but the type in `src/types/index.ts:156`
  only permits `string | undefined`. Updating the README is the
  minimal, lower-risk fix; widening the type would change runtime
  expectations.

closes plaid#397
closes plaid#398
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant