Upgrade to rescript 11 (#811) · rescript-react-native/rescript-react-native@38cc49d

@@ -32,9 +32,8 @@ module ValueAnimations = (Val: Value) => {

3232

iterations?: int,

3333

}

343435-

@obj

36-

external // @deprecated("Directly create record instead")

37-

config: (

35+

@deprecated("Directly create record instead") @obj

36+

external config: (

3837

~velocity: Val.rawValue,

3938

~deceleration: float=?,

4039

~isInteraction: bool=?,

@@ -73,9 +72,8 @@ module ValueAnimations = (Val: Value) => {

7372

iterations?: int,

7473

}

757476-

@obj

77-

external // @deprecated("Directly create record instead")

78-

config: (

75+

@deprecated("Directly create record instead") @obj

76+

external config: (

7977

~toValue: toValue,

8078

~restDisplacementThreshold: float=?,

8179

~overshootClamping: bool=?,

@@ -117,9 +115,8 @@ module ValueAnimations = (Val: Value) => {

117115

iterations?: int,

118116

}

119117120-

@obj

121-

external // @deprecated("Directly create record instead")

122-

config: (

118+

@deprecated("Directly create record instead") @obj

119+

external config: (

123120

~toValue: toValue,

124121

~easing: Easing.t=?,

125122

~duration: float=?,

@@ -153,9 +150,8 @@ module Interpolation = {

153150

extrapolateRight?: extrapolate,

154151

}

155152156-

@obj

157-

external // @deprecated("Directly create record instead")

158-

config: (

153+

@deprecated("Directly create record instead") @obj

154+

external config: (

159155

~inputRange: array<float>,

160156

~outputRange: outputRange,

161157

~easing: Easing.t=?,

@@ -229,7 +225,8 @@ module ValueXY = {

229225230226

@deprecated("Please use xyValue instead") @obj

231227

external jsValue: (~x: float, ~y: float) => rawValue = ""

232-

@obj external xyValue: (~x: float, ~y: float) => rawValue = ""

228+

@obj

229+

external xyValue: (~x: float, ~y: float) => rawValue = ""

233230234231

type layout = {

235232

left: Value.t,

@@ -337,39 +334,35 @@ module StyleProp = {

337334

}

338335339336

module FlatList = {

340-

include FlatList

341-342-

let make = Obj.magic(createAnimatedComponent(FlatList.make))

337+

@react.component(: FlatList.props<'item, 'extraData>) @module("react-native") @scope("Animated")

338+

external make: FlatList.props<'item, 'extraData> => React.element = "FlatList"

343339

}

344340345341

module Image = {

346-

include Image

347-348-

let make = createAnimatedComponent(make)

342+

@react.component(: Image.props) @module("react-native") @scope("Animated")

343+

external make: Image.props => React.element = "Image"

349344

}

350345351346

module ScrollView = {

352-

include ScrollView

353-354-

let make = createAnimatedComponent(make)

347+

@react.component(: ScrollView.props) @module("react-native") @scope("Animated")

348+

external make: ScrollView.props => React.element = "ScrollView"

355349

}

356350357351

module SectionList = {

358-

include SectionList

359-360-

let make = Obj.magic(createAnimatedComponent(SectionList.make))

352+

@react.component(: SectionList.props<'sectionData, 'item, 'extraData>)

353+

@module("react-native")

354+

@scope("Animated")

355+

external make: SectionList.props<'sectionData, 'item, 'extraData> => React.element = "SectionList"

361356

}

362357363358

module Text = {

364-

include Text

365-366-

let make = createAnimatedComponent(make)

359+

@react.component(: Text.props) @module("react-native") @scope("Animated")

360+

external make: Text.props => React.element = "Text"

367361

}

368362369363

module View = {

370-

include View

371-372-

let make = createAnimatedComponent(make)

364+

@react.component(: View.props) @module("react-native") @scope("Animated")

365+

external make: View.props => React.element = "View"

373366

}

374367375368

type config = {useNativeDriver: bool}