Fix lots of minor type errors - #14
Merged
Merged
Conversation
The define(...) call types say a `number` is returned for u64s, when they should actually be `bigint`. Since this obviously won't work (a u64 is bigger than the largest `Number.MAX_SAFE_INTEGER`), I'm pretty sure this has got to be an error in the typings. I think this is probably worth digging more into at some point (ie, is this actually a thing?), because if it isn't an error in the typings, then it's possible there are cases where there would be data loss sometimes due to truncation.
… be fed into UniffiError I think I must be missing something from the react native bindgen, I think it handles this in a much more elegant way where the error lift step actually returns an Error subclass. Anyway, this is also something else to look into longer term.
This isn't defined on all platforms and typescript complains, however there's a guard for this in the code so the type error produced here isn't all that actionable.
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.
With these these minor type errors fixed, the initial LiveKit related bindgen output we're testing with no longer had any typescript build errors! 🎉
process.platformvaluesffi-rs(more info)liftErrorwas returning astring, not anError(more info)