Skip to content
Merged
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
14 changes: 0 additions & 14 deletions src/apis/AccessibilityInfo.res
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ external isScreenReaderEnabled: unit => promise<bool> = "isScreenReaderEnabled"
@scope("AccessibilityInfo") @module("react-native")
external isAccessibilityServiceEnabled: unit => promise<bool> = "isAccessibilityServiceEnabled"

@deprecated("Instead of using removeEventListener(), invoke `remove()` on the subscription itself.")
@scope("AccessibilityInfo")
@module("react-native")
external removeEventListener: @string
[
| #boldTextChanged(bool => unit)
| #grayscaleChanged(bool => unit)
| #invertColorsChanged(bool => unit)
| #reduceMotionChanged(bool => unit)
| #screenReaderChanged(bool => unit)
| #reduceTransparencyChanged(bool => unit)
| #announcementFinished(announcementResult => unit)
] => unit = "removeEventListener"

@scope("AccessibilityInfo") @module("react-native")
external setAccessibilityFocus: NativeTypes.nodeHandle => unit = "setAccessibilityFocus"

Expand Down
22 changes: 0 additions & 22 deletions src/apis/ActionSheetIOS.res
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@ type options = {
cancelButtonTintColor?: Color.t,
}

@deprecated("Directly create record instead") @obj
external options: (
~options: array<string>,
~cancelButtonIndex: int=?,
~destructiveButtonIndex: array<int>=?,
~disabledButtonIndices: int=?,
~title: string=?,
~message: string=?,
~tintColor: Color.t=?,
~cancelButtonTintColor: Color.t=?,
unit,
) => options = ""

@module("react-native") @scope("ActionSheetIOS")
external showActionSheetWithOptions: (options, int => unit) => unit = "showActionSheetWithOptions"

Expand All @@ -32,15 +19,6 @@ type shareOptions = {
excludedActivityTypes?: array<string>,
}

@deprecated("Directly create record instead") @obj
external shareOptions: (
~url: string=?,
~message: string=?,
~subject: string=?,
~excludedActivityTypes: array<string>=?,
unit,
) => shareOptions = ""

type error = {stack: option<string>}

@module("react-native") @scope("ActionSheetIOS")
Expand Down
8 changes: 0 additions & 8 deletions src/apis/Alert.res
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ type options = {
onDismiss?: unit => unit,
}

@obj
external // @deprecated("Directly create record instead")
options: (~cancelable: bool=?, ~onDismiss: unit => unit=?, unit) => options = ""

type style = [#default | #cancel | #destructive]

type button = {
Expand All @@ -16,10 +12,6 @@ type button = {
isPreferred?: bool,
}

@obj
external // @deprecated("Directly create record instead")
button: (~text: string=?, ~onPress: unit => unit=?, ~style: style=?, unit) => button = ""

@scope("Alert") @module("react-native")
external alert: (
~title: string,
Expand Down
61 changes: 0 additions & 61 deletions src/apis/Animated.res
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ module ValueAnimations = (Val: Value) => {
iterations?: int,
}

@deprecated("Directly create record instead") @obj
external config: (
~velocity: Val.rawValue,
~deceleration: float=?,
~isInteraction: bool=?,
~useNativeDriver: bool,
~onComplete: Animation.endCallback=?,
~iterations: int=?,
unit,
) => config = ""

@module("react-native") @scope("Animated")
external decay: (Val.t, config) => Animation.t = "decay"
}
Expand Down Expand Up @@ -72,28 +61,6 @@ module ValueAnimations = (Val: Value) => {
iterations?: int,
}

@deprecated("Directly create record instead") @obj
external config: (
~toValue: toValue,
~restDisplacementThreshold: float=?,
~overshootClamping: bool=?,
~restSpeedThreshold: float=?,
~velocity: Val.rawValue=?,
~bounciness: float=?,
~speed: float=?,
~tension: float=?,
~friction: float=?,
~stiffness: float=?,
~mass: float=?,
~damping: float=?,
~delay: float=?,
~isInteraction: bool=?,
~useNativeDriver: bool,
~onComplete: Animation.endCallback=?,
~iterations: int=?,
unit,
) => config = ""

@module("react-native") @scope("Animated")
external spring: (Val.t, config) => Animation.t = "spring"
}
Expand All @@ -115,19 +82,6 @@ module ValueAnimations = (Val: Value) => {
iterations?: int,
}

@deprecated("Directly create record instead") @obj
external config: (
~toValue: toValue,
~easing: Easing.t=?,
~duration: float=?,
~delay: float=?,
~isInteraction: bool=?,
~useNativeDriver: bool,
~onComplete: Animation.endCallback=?,
~iterations: int=?,
unit,
) => config = ""

@module("react-native") @scope("Animated")
external timing: (Val.t, config) => Animation.t = "timing"
}
Expand All @@ -150,16 +104,6 @@ module Interpolation = {
extrapolateRight?: extrapolate,
}

@deprecated("Directly create record instead") @obj
external config: (
~inputRange: array<float>,
~outputRange: outputRange,
~easing: Easing.t=?,
~extrapolate: extrapolate=?,
~extrapolateLeft: extrapolate=?,
~extrapolateRight: extrapolate=?,
unit,
) => config = ""
@send external interpolate: (value<'a>, config) => t = "interpolate"
}

Expand Down Expand Up @@ -223,11 +167,6 @@ module ValueXY = {
type addListenerCallback = rawValue => unit
})

@deprecated("Please use xyValue instead") @obj
external jsValue: (~x: float, ~y: float) => rawValue = ""
@obj
external xyValue: (~x: float, ~y: float) => rawValue = ""

type layout = {
left: Value.t,
top: Value.t,
Expand Down
5 changes: 0 additions & 5 deletions src/apis/Dimensions.res
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,5 @@ type eventType = [#change]
@module("react-native") @scope("Dimensions")
external addEventListener: (eventType, handler => unit) => EventSubscription.t = "addEventListener"

@deprecated("Use `remove` on the EventSubscription from `addEventListener`.")
@module("react-native")
@scope("Dimensions")
external removeEventListener: (eventType, handler => unit) => unit = "removeEventListener"

@module("react-native")
external useWindowDimensions: unit => displayMetrics = "useWindowDimensions"
9 changes: 0 additions & 9 deletions src/apis/DynamicColorIOS.res
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,4 @@ type t = {
highContrastDark?: Color.t,
}

@deprecated("Directly create record instead") @obj
external dynamicColor: (
~dark: Color.t,
~light: Color.t,
~highContrastLight: option<Color.t>=?,
~highContrastDark: option<Color.t>=?,
unit,
) => t = ""

@module("react-native") external make: t => Color.t = "DynamicColorIOS"
20 changes: 0 additions & 20 deletions src/apis/LayoutAnimation.res
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,13 @@ type animationConfig = {
property?: property,
}

@deprecated("Directly create record instead") @obj
external animationConfig: (
~duration: float=?,
~delay: float=?,
~springDamping: float=?,
~initialVelocity: float=?,
~\"type": animationType=?,
~property: property=?,
unit,
) => animationConfig = ""

type layoutAnimationConfig = {
duration: float,
create?: animationConfig,
update?: animationConfig,
delete?: animationConfig,
}

@deprecated("Directly create record instead") @obj
external layoutAnimationConfig: (
~duration: float,
~create: animationConfig=?,
~update: animationConfig=?,
~delete: animationConfig=?,
unit,
) => layoutAnimationConfig = ""

// multiple externals
@module("react-native") @scope("LayoutAnimation")
external configureNext: layoutAnimationConfig => unit = "configureNext"
Expand Down
8 changes: 0 additions & 8 deletions src/apis/Linking.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ type extraValue = ExtraValue.t

type extra = {key: string, value: extraValue}

@deprecated("Directly create record instead") @obj
external extra: (~key: string, ~value: extraValue) => extra = ""

@scope("Linking") @module("react-native")
external openURL: string => promise<unit> = "openURL"

Expand All @@ -40,8 +37,3 @@ type eventType = [#url]

@scope("Linking") @module("react-native")
external addEventListener: (eventType, url => unit) => EventSubscription.t = "addEventListener"

@deprecated("Instead of using removeEventListener(), invoke `remove()` on the subscription itself.")
@scope("Linking")
@module("react-native")
external removeEventListener: (eventType, url => unit) => unit = "removeEventListener"
18 changes: 0 additions & 18 deletions src/apis/PanResponder.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,6 @@ type config = {
onShouldBlockNativeResponder?: (Event.pressEvent, gestureState) => bool,
}

@deprecated("Directly create record instead") @obj
external config: (
~onMoveShouldSetPanResponder: (Event.pressEvent, gestureState) => bool=?,
~onMoveShouldSetPanResponderCapture: (Event.pressEvent, gestureState) => bool=?,
~onStartShouldSetPanResponder: (Event.pressEvent, gestureState) => bool=?,
~onStartShouldSetPanResponderCapture: (Event.pressEvent, gestureState) => bool=?,
~onPanResponderReject: (Event.pressEvent, gestureState) => unit=?,
~onPanResponderGrant: (Event.pressEvent, gestureState) => unit=?,
~onPanResponderStart: (Event.pressEvent, gestureState) => unit=?,
~onPanResponderEnd: (Event.pressEvent, gestureState) => unit=?,
~onPanResponderRelease: (Event.pressEvent, gestureState) => unit=?,
~onPanResponderMove: (Event.pressEvent, gestureState) => unit=?,
~onPanResponderTerminate: (Event.pressEvent, gestureState) => unit=?,
~onPanResponderTerminationRequest: (Event.pressEvent, gestureState) => bool=?,
~onShouldBlockNativeResponder: (Event.pressEvent, gestureState) => bool=?,
unit,
) => config = ""

@module("react-native") @scope("PanResponder")
external create: config => t = "create"

Expand Down
15 changes: 0 additions & 15 deletions src/apis/PermissionsAndroid.res
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ module Permission = {
@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external nearbyWifiDevices: t = "NEARBY_WIFI_DEVICES"

@module("react-native")
@scope(("PermissionsAndroid", "PERMISSIONS"))
@deprecated("Use `postNotifications` instead")
external postNotification: t = "POST_NOTIFICATION"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external postNotifications: t = "POST_NOTIFICATIONS"

Expand Down Expand Up @@ -154,16 +149,6 @@ type rationale = {
buttonNeutral?: string,
}

@deprecated("Directly create record instead") @obj
external rationale: (
~title: string,
~message: string,
~buttonPositive: string,
~buttonNegative: string=?,
~buttonNeutral: string=?,
unit,
) => rationale = ""

type dict = dict<Result.t>

@scope("PermissionsAndroid") @module("react-native")
Expand Down
15 changes: 0 additions & 15 deletions src/apis/PermissionsAndroid.resi
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ module Permission: {
@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external nearbyWifiDevices: t = "NEARBY_WIFI_DEVICES"

@module("react-native")
@scope(("PermissionsAndroid", "PERMISSIONS"))
@deprecated("Use `postNotifications` instead")
external postNotification: t = "POST_NOTIFICATION"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external postNotifications: t = "POST_NOTIFICATIONS"

Expand Down Expand Up @@ -154,16 +149,6 @@ type rationale = {
buttonNeutral?: string,
}

@deprecated("Directly create record instead") @obj
external rationale: (
~title: string,
~message: string,
~buttonPositive: string,
~buttonNegative: string=?,
~buttonNeutral: string=?,
unit,
) => rationale = ""

type dict

@scope("PermissionsAndroid") @module("react-native")
Expand Down
13 changes: 0 additions & 13 deletions src/apis/Share.res
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ type content = {
url?: string,
}

@deprecated("Directly create record instead") @obj
external content: (~title: string=?, ~message: string=?, ~url: string=?, unit) => content = ""

type options = {
subject?: string,
tintColor?: string,
Expand All @@ -15,16 +12,6 @@ type options = {
anchor?: int,
}

@deprecated("Directly create record instead") @obj
external options: (
~subject: string=?,
~tintColor: string=?,
~excludedActivityTypes: array<string>=?,
~dialogTitle: string=?,
~anchor: int=?,
unit,
) => options = ""

type action

@module("react-native") @scope("Share")
Expand Down
Loading
Loading