Skip to content

Fix/sdk strict types#274

Open
Aboyeji-Isaac wants to merge 3 commits into
Miracle656:mainfrom
Aboyeji-Isaac:fix/sdk-strict-types
Open

Fix/sdk strict types#274
Aboyeji-Isaac wants to merge 3 commits into
Miracle656:mainfrom
Aboyeji-Isaac:fix/sdk-strict-types

Conversation

@Aboyeji-Isaac
Copy link
Copy Markdown

Closes #179

  • Derives WalletState via Pick<ReturnType<typeof useInvisibleWallet>, ...> so it cannot drift from the hook
  • Removes invented RegisterOptions, SignOptions, SendOptions — they did not match the positional hook API
  • Re-exports all real public types through sdk/src/index.ts
  • Excludes src/examples from SDK tsconfig so tsc --noEmit passes cleanly under strict: true

aboyejiisaiah-commits and others added 3 commits June 1, 2026 13:24
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 Aboyeji-Isaac requested a review from Miracle656 as a code owner June 1, 2026 12:41
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@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.

Copy link
Copy Markdown
Owner

@Miracle656 Miracle656 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly the clean split I asked for on #213types.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.

Copy link
Copy Markdown
Owner

@Miracle656 Miracle656 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

Tighten TypeScript declarations for invisible-wallet-sdk

3 participants