Skip to content

feat: convert relay-id to TypeScript - #1055

Merged
jordan-a-young merged 1 commit into
masterfrom
feat/relay-id-typescript
Oct 2, 2026
Merged

jordan-a-young merged 1 commit into
masterfrom
feat/relay-id-typescript

Conversation

@jordan-a-young

Copy link
Copy Markdown
Member

Summary

Converts @availity/relay-id from JavaScript to TypeScript as part of the ongoing SDK TypeScript migration.

Changes

  • Replace index.js + hand-written index.d.ts with a single index.ts
  • Add JSDoc to all four exported functions (base64, unbase64, toGlobalId, fromGlobalId)
  • Export a GlobalId interface for the fromGlobalId return type
  • Add explicit return types to all functions
  • Convert index.test.js to index.test.ts
  • Remove duplicate colon-in-id test
  • Add missing edge cases: empty id roundtrip, numeric id roundtrip
  • Update package.json build/dev scripts to reference index.ts

Testing

16/16 tests passing. Lint clean.

- Replace index.js + index.d.ts with index.ts
- Add JSDoc to all exported functions
- Export GlobalId interface for fromGlobalId return type
- Add explicit return types to all functions
- Convert tests to .ts, remove duplicate colon-in-id test
- Add missing edge case coverage (empty id, numeric id roundtrip)
- Update package.json build/dev scripts to reference index.ts
@jordan-a-young
jordan-a-young merged commit 98beb0e into master Oct 2, 2026
7 checks passed
@jordan-a-young
jordan-a-young deleted the feat/relay-id-typescript branch October 2, 2026 15:17
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.

1 participant