This repository was archived by the owner on Jul 8, 2024. It is now read-only.
Add typescript types#58
Open
corollari wants to merge 1 commit into
Open
Conversation
Author
|
@GusGold thoughts? |
mdcuk34
approved these changes
Mar 30, 2021
dartess
reviewed
Nov 1, 2021
| name: string, | ||
| symbol: string, | ||
| validator: { | ||
| // `currency` must be `any` to avoid recureferences |
There was a problem hiding this comment.
Currently the typescript seems to have no problem with recursive types. Or is it not so? Perhaps it is worth updating the request?
|
@mdcuk34 Do you plan to update the request to make merge possible? @GusGold How do you look at this request? #49 here you are not against typescript. Should @mdcuk34 update this request? Personally, it seems to me that in this case it would be more correct to put the declaration file at the root, instead of changing the build process. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds typescript types to the public API. I tried to be the least invasive possible with the current code and setup (without sacrificing type checking) so I simply converted some files into typescript and made typescript emit the declaration files.
The only changes to the build process will be:
npm run build-tswill need to be run in order to generate currencies.js and wallet_address_validator.js.tsfiles instead.