-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cbor-web replaces cbor #754
Conversation
916e149
to
590a232
Compare
@@ -0,0 +1 @@ | |||
declare module 'cbor-web' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm debating - is an empty declaration file better than a @ts-expect-error
in front of the import? The result is the same - it's treated as any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I guess there is also an option to keep cbor as a dependency and make this module definition re-export the actual cbor types. This should be doable, though I doubt I will pull it off quickly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's the solution, this way we'll still keep the dependency on cbor - extracting type definitions from another package and adding it to your build is not really what tsc is made for I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also it wouldn't really help us much with anything, we're just importing two functions and do not plan to re-export them, there's not that much we can do wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just not the biggest fan of empty declaration files, purely for aesthetical reasons
fdfe30f
to
5d7980d
Compare
https://github.com/KILTprotocol/ticket/issues/2687