Fix/sdk strict types#274
Conversation
Remove RegisterOptions, SignOptions, and SendOptions — they do not match the hook positional API and would mislead integrators. Replace the hand-written WalletState with a Pick derived from the hook return type so it cannot drift. Clean up index.ts to only re-export value exports from InvisibleWalletCore; all public types flow through useInvisibleWallet exports.
The Vue example app has its own tsconfig and its own devDependencies (vue, vite, @vitejs/plugin-vue). Including src/examples/** in the SDK tsconfig caused tsc --noEmit to fail with module-not-found errors for those packages. Excluding the examples dir keeps the SDK build clean without affecting the example app.
|
@Aboyeji-Isaac is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
Miracle656
left a comment
There was a problem hiding this comment.
This is exactly the clean split I asked for on #213 — types.ts with the Pick<>-derived WalletState, the export * from './types' re-export, and the tsconfig change, with no Vue adapter or dist/.
Just one trivial rebase needed: main gained an exclude block in sdk/tsconfig.json since you branched, so your exclude addition now conflicts. Rebase on latest main and merge the two arrays into one:
"exclude": [
"src/**/*.native.ts",
"src/**/*.test.ts",
"src/examples"
]git fetch origin main && git rebase origin/main, resolve that one block (and regenerate the lockfile if it conflicts), force-push. The moment it's mergeable I'll merge it — this closes #179.
Miracle656
left a comment
There was a problem hiding this comment.
This is still showing conflicts against main (the tsconfig.json exclude array — main now lists *.native.ts/*.test.ts and this branch adds src/examples). Please rebase on the latest main and merge the two exclude lists into one array (keep both main's entries and your src/examples). Once it's mergeable I'll merge it to close #179.
Closes #179
WalletStateviaPick<ReturnType<typeof useInvisibleWallet>, ...>so it cannot drift from the hookRegisterOptions,SignOptions,SendOptions— they did not match the positional hook APIsdk/src/index.tssrc/examplesfrom SDK tsconfig sotsc --noEmitpasses cleanly understrict: true