-
-
Notifications
You must be signed in to change notification settings - Fork 151
Rescript 12 #848
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
Open
Freddy03h
wants to merge
14
commits into
main
Choose a base branch
from
rescript-12
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rescript 12 #848
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
25c6ebd
update to rescript 12
Freddy03h b5536f3
esmodule
Freddy03h 2457952
rename suffix .bs.js to .res.js
Freddy03h 08df47f
update node version
Freddy03h ad3c594
remove multiple externals
Freddy03h bebb2e3
format
Freddy03h c9738bb
revert multiple external animated event
Freddy03h 5f09462
nested records
Freddy03h 4d31679
use unboxed variants
Freddy03h abe21ed
Refactor accessibility props to use centralized types from Accessibil…
Freddy03h 244f7b6
Refactor event payloads and types to utilize centralized Layout types…
Freddy03h 6a3eea0
Refactor image types and props to enhance clarity and maintainability
Freddy03h 941e20c
Add PointerEvent module and integrate pointer event props into compon…
Freddy03h 1caa00d
revert announceForAccessibilityWithOptions
Freddy03h File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 18 | ||
| 24 |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
|
|
||
|
|
||
| import * as ReactNative from "react-native"; | ||
| import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js"; | ||
|
|
||
| let Animation = {}; | ||
|
|
||
| function ValueAnimations(Val) { | ||
| let Decay = {}; | ||
| let Spring = {}; | ||
| let Timing = {}; | ||
| return { | ||
| Decay: Decay, | ||
| Spring: Spring, | ||
| Timing: Timing | ||
| }; | ||
| } | ||
|
|
||
| let Interpolation = {}; | ||
|
|
||
| function interpolate(prim0, prim1) { | ||
| return prim0.interpolate(prim1); | ||
| } | ||
|
|
||
| let ValueOperations = { | ||
| interpolate: interpolate | ||
| }; | ||
|
|
||
| function ValueMethods(Val) { | ||
| let Decay = {}; | ||
| let Spring = {}; | ||
| let Timing = {}; | ||
| return { | ||
| Decay: Decay, | ||
| Spring: Spring, | ||
| Timing: Timing | ||
| }; | ||
| } | ||
|
|
||
| let Decay = {}; | ||
|
|
||
| let Spring = {}; | ||
|
|
||
| let Timing = {}; | ||
|
|
||
| let Value = { | ||
| Decay: Decay, | ||
| Spring: Spring, | ||
| Timing: Timing, | ||
| interpolate: interpolate | ||
| }; | ||
|
|
||
| let Decay$1 = {}; | ||
|
|
||
| let Spring$1 = {}; | ||
|
|
||
| let Timing$1 = {}; | ||
|
|
||
| let ValueXY = { | ||
| Decay: Decay$1, | ||
| Spring: Spring$1, | ||
| Timing: Timing$1 | ||
| }; | ||
|
|
||
| let Decay$2 = {}; | ||
|
|
||
| let Spring$2 = {}; | ||
|
|
||
| let Timing$2 = {}; | ||
|
|
||
| let Color = { | ||
| Decay: Decay$2, | ||
| Spring: Spring$2, | ||
| Timing: Timing$2 | ||
| }; | ||
|
|
||
| function timing(prim0, prim1) { | ||
| return ReactNative.Animated.timing(prim0, prim1); | ||
| } | ||
|
|
||
| function spring(prim0, prim1) { | ||
| return ReactNative.Animated.spring(prim0, prim1); | ||
| } | ||
|
|
||
| function decay(prim0, prim1) { | ||
| return ReactNative.Animated.decay(prim0, prim1); | ||
| } | ||
|
|
||
| function start(prim0, prim1) { | ||
| prim0.start(prim1 !== undefined ? Primitive_option.valFromOption(prim1) : undefined); | ||
| } | ||
|
|
||
| function stop(prim) { | ||
| prim.stop(); | ||
| } | ||
|
|
||
| function reset(prim) { | ||
| prim.reset(); | ||
| } | ||
|
|
||
| let StyleProp = {}; | ||
|
|
||
| let FlatList = {}; | ||
|
|
||
| let Image = {}; | ||
|
|
||
| let ScrollView = {}; | ||
|
|
||
| let SectionList = {}; | ||
|
|
||
| let Text = {}; | ||
|
|
||
| let View = {}; | ||
|
|
||
| export { | ||
| Animation, | ||
| ValueAnimations, | ||
| Interpolation, | ||
| ValueOperations, | ||
| ValueMethods, | ||
| Value, | ||
| ValueXY, | ||
| Color, | ||
| timing, | ||
| spring, | ||
| decay, | ||
| start, | ||
| stop, | ||
| reset, | ||
| StyleProp, | ||
| FlatList, | ||
| Image, | ||
| ScrollView, | ||
| SectionList, | ||
| Text, | ||
| View, | ||
| } | ||
| /* react-native Not a pure module */ | ||
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
this seems wrong
but not sure if it was a compiler bug
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.
Why it's wrong? It look the same in the
.bs.jsThere 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.
It is not zero cost, but it could be, if you duplicate the binding definition instead of using
let.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.
Oh, I see! But it's not really a regression, we've been living with it for years now, so for me it's a non-blocker for this PR.
It's definitely something we could improve as part of a more global Animated refactoring, though!
For now, IMO, the goal should be to move forward with a
0.84release using Rescript12.0. We're already a bit late on the release, so we can use a later one for other Rescript updates (12.1,12.2,12.3?) or a breaking-change refactor.