Skip to content

chore(sdk): clean up typescript definitions#1371

Open
huancheng-trili wants to merge 1 commit intomainfrom
huanchengchang/jstz-949
Open

chore(sdk): clean up typescript definitions#1371
huancheng-trili wants to merge 1 commit intomainfrom
huanchengchang/jstz-949

Conversation

@huancheng-trili
Copy link
Collaborator

@huancheng-trili huancheng-trili commented Oct 31, 2025

Context

Part of JSTZ-949.
JSTZ-949

Description

Trimmed the type definition file and kept only jstz-specific APIs. Also updated Kv.has to Kv.contains since the method is renamed in v2 runtime.

Since now definitions for other types like Request and URL are removed from the package, tsconfig needs to be updated such that typescript compilers know that they need to find relevant definitions from the regular source libraries, i.e. dom. This means that APIs not supported by jstz will not be detected at compile time, but given the amount of APIs enabled now in jstz, duplicating definitions of those types in the definition file is quite complicated. That can be explored later on.

Manually testing the PR

Installed the local type package and ran tsc against all examples. There were no errors except for examples/fa2/test. Those 2 scripts are outdated anyway and I'm not sure if we intend to fix them, so they are ignored.

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.10%. Comparing base (7743776) to head (047c05c).
⚠️ Report is 6 commits behind head on main.
see 16 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7743776...047c05c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@huancheng-trili huancheng-trili marked this pull request as ready for review October 31, 2025 13:19
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.

2 participants