Skip to content

feat(sdk): add tsd type tests for SDK return types#403

Open
blockchain-maxis wants to merge 2 commits into
Miracle656:mainfrom
blockchain-maxis:feat/sdk-tsd-type-tests
Open

feat(sdk): add tsd type tests for SDK return types#403
blockchain-maxis wants to merge 2 commits into
Miracle656:mainfrom
blockchain-maxis:feat/sdk-tsd-type-tests

Conversation

@blockchain-maxis

Copy link
Copy Markdown
Contributor

Summary

  • Adds sdk/test-d/index.test-d.ts with 54 type assertions covering the most-used SDK return types
  • Adds tsd as a devDependency to sdk/package.json
  • Adds test-d script (npm run build && tsd) so CI can verify types without a separate build step

Type coverage

Category Types tested
Config WalletConfig, StorageAdapter
WebAuthn WebAuthnSignature, AuthenticatorAttachment
Wallet ops RegisterResult, DeployResult, AddSignerResult, RotateSignerResult
Signers SignerInfo, InitiateRecoveryResult
Hook surface InvisibleWallet (address, flags, register, deploy)
Outbox OutboxStatus, OutboxEntry
SEP-7 Sep7MemoType, Sep7PayRequest
Messaging SignedMessage
Errors RecoveryTimelockActive, NoGuardianSet, RecoveryNotPending

Both positive (expectAssignable) and negative (expectNotAssignable) assertions are included for all union types.

Verification

cd sdk && npm run test-d
# → builds dist, then tsd runs 54 assertions: 0 errors

closes #260

Adds sdk/test-d/index.test-d.ts with 54 assertions covering
WalletConfig, WebAuthnSignature, RegisterResult, DeployResult,
AddSignerResult, RotateSignerResult, SignerInfo, InitiateRecoveryResult,
StorageAdapter, InvisibleWallet, OutboxStatus/Entry, Sep7PayRequest,
Sep7MemoType, SignedMessage, and all three error classes.

Adds tsd devDependency and test-d script (builds then runs tsd).

closes Miracle656#260
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@blockchain-maxis is attempting to deploy a commit to the miracle656's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@blockchain-maxis Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

SDK type tests with tsd

1 participant