TS Updates#162
Merged
Merged
Conversation
These @types are needed if a TS project is rebuilding bitbox-sdk from source. This would be the case even if .d.ts files were published instead of .ts files since the .d.ts file would still have references to these dependent types. Also, on a separate note. Maybe something to consider in a future release is to publish `.d.ts` files instead of the `.ts` files. I'm currently planning on doing this for `slpjs` soon, but right now I'm struggling with some strange issue preventing me from doing so.
This patch fixes the issue I get when I run `tsc` in a ts project that depends on recent versions of bitbox-sdk:
node_modules/bitbox-sdk/lib/Crypto.ts:1:1
1 import * as randomBytes from "randombytes"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.
The default typescript tsconfig.json file generated from `tsc --init` has this property set to true. If there are no build errors or other failures resulting from this update, then it would probably be easier for other users to update this.
fix randomBytes import for same reason as Crypto.ts
Move some @types to "dependencies"
Fix randomBytes import
SpicyPete
previously approved these changes
Nov 21, 2019
SpicyPete
left a comment
There was a problem hiding this comment.
Seems like fine updates to me.
Type files are small and should be direct dependencies if used in project exports, so this looks good.
SpendBCH
previously approved these changes
Nov 22, 2019
fix(typescript): Updates to TS types
f86ffab
SpendBCH
approved these changes
Nov 25, 2019
|
🎉 This PR is included in version 8.8.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
This PR includes two merged PRs for updates to TypeScript, contributed by @jcramer