Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ node_modules
# ReScript artifacts
# *.bs.js # we do want this files to ensure zero-cost
.bsb.lock
**/lib/bs
**/lib/ocaml
lib/
**/.merlin
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
24
2,573 changes: 1,001 additions & 1,572 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"description": "ReScript bindings for React Native.",
"version": "0.83.0",
"peerDependencies": {
"@rescript/react": ">=0.14.2",
"@rescript/react": ">=0.15.0",
"react-native": ">=0.83.0",
"rescript": ">=11.0.0"
"rescript": ">=12.0.0"
},
"overrides": {
"react": "^19.2.0"
Expand All @@ -28,24 +28,24 @@
"scripts": {
"prepare": "husky install",
"format:most": "prettier --write \"**/*.{md,json,js,css}\"",
"format:res": "rescript format -all",
"format": "npm run format:most && npm run format:res",
"re:start": "rescript build -w",
"re:build": "rescript",
"re:clean-build": "rescript clean && rescript",
"format": "npm run format:most && npm run re:format",
"re:start": "rescript watch",
"re:build": "rescript build",
"re:clean": "rescript clean",
"re:format": "rescript format",
"start": "npm run re:start",
"build": "npm run re:build",
"test": "npm run re:clean-build",
"test": "npm run re:clean && npm run re:build",
"release": "npmpub"
},
"devDependencies": {
"@rescript/react": "^0.14.2",
"@rescript/react": "^0.15.0",
"husky": "^8.0.0",
"lint-staged": "^13.0.0",
"npm-run-all": "^4.0.0",
"npmpub": "^5.0.0",
"prettier": "^2.0.0",
"rescript": "^11.1.0"
"rescript": "~12.0.2"
},
"prettier": {
"trailingComma": "all"
Expand Down
8 changes: 4 additions & 4 deletions rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
"version": 4
},
"package-specs": {
"module": "commonjs",
"module": "esmodule",
"in-source": true
},
"suffix": ".bs.js",
"suffix": ".res.js",
"sources": [
{
"dir": "src",
"subdirs": true
}
],
"bsc-flags": [
"compiler-flags": [
"-bs-no-version-header"
],
"warnings": {
"error": true
},
"bs-dependencies": [
"dependencies": [
"@rescript/react"
]
}
7 changes: 2 additions & 5 deletions src/apis/AccessibilityInfo.res
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ external addEventListener: @string
| #announcementFinished(announcementResult => unit)
] => EventSubscription.t = "addEventListener"

@scope("AccessibilityInfo") @module("react-native")
external announceForAccessibility: string => unit = "announceForAccessibility"

type announceForAccessibilityOptions = {queue?: bool}

@scope("AccessibilityInfo") @module("react-native")
external announceForAccessibilityWithOptions: (string, announceForAccessibilityOptions) => unit =
"announceForAccessibilityWithOptions"
external announceForAccessibility: (string, ~options: announceForAccessibilityOptions=?) => unit =
"announceForAccessibility"

@scope("AccessibilityInfo") @module("react-native")
external getRecommendedTimeoutMillis: float => promise<float> = "getRecommendedTimeoutMillis"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
136 changes: 0 additions & 136 deletions src/apis/Animated.bs.js

This file was deleted.

14 changes: 5 additions & 9 deletions src/apis/Animated.res
Original file line number Diff line number Diff line change
Expand Up @@ -209,27 +209,23 @@ external stagger: (float, array<Animation.t>) => Animation.t = "stagger"

type loopConfig = {iterations?: int, resetBeforeIteration?: bool}

// multiple externals
@module("react-native") @scope("Animated")
external loop: Animation.t => Animation.t = "loop"

// multiple externals
@module("react-native") @scope("Animated")
external loopWithConfig: (Animation.t, loopConfig) => Animation.t = "loop"
external loop: (Animation.t, ~config: loopConfig=?) => Animation.t = "loop"

type eventOptions<'a, 'platformConfig> = {
type eventConfig<'a, 'platformConfig> = {
listener?: 'a,
useNativeDriver: bool,
platformConfig?: 'platformConfig,
}

// multiple externals
@module("react-native") @scope("Animated")
external event1: (array<'mapping>, eventOptions<'a, 'platformConfig>) => 'a = "event"
external event1: (array<'mapping>, ~config: eventConfig<'a, 'platformConfig>=?) => 'a = "event"

// multiple externals
@module("react-native") @scope("Animated")
external event2: (('mapping1, 'mapping2), eventOptions<'a, 'platformConfig>) => 'a = "event"
external event2: (('mapping1, 'mapping2), ~config: eventConfig<'a, 'platformConfig>=?) => 'a =
"event"

@module("react-native") @scope("Animated")
external createAnimatedComponent: React.component<'props> => React.component<'props> =
Expand Down
Loading
Loading