chore(sdk): clean up typescript definitions#1371
Open
huancheng-trili wants to merge 1 commit intomainfrom
Open
chore(sdk): clean up typescript definitions#1371huancheng-trili wants to merge 1 commit intomainfrom
huancheng-trili wants to merge 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Part of JSTZ-949.
JSTZ-949
Description
Trimmed the type definition file and kept only jstz-specific APIs. Also updated
Kv.hastoKv.containssince the method is renamed in v2 runtime.Since now definitions for other types like
RequestandURLare 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.