Use @return(nullable) in Appearance (#777) · rescript-react-native/rescript-react-native@91f0a67

Original file line numberDiff line numberDiff line change

@@ -1,10 +1,10 @@

11

type t = [#dark | #light]

22
3-

@module("react-native") @scope("Appearance")

4-

external getColorScheme: unit => Js.Null.t<t> = "getColorScheme"

3+

@module("react-native") @scope("Appearance") @return(nullable)

4+

external getColorScheme: unit => option<t> = "getColorScheme"

55
6-

@module("react-native")

7-

external useColorScheme: unit => Js.Null.t<t> = "useColorScheme"

6+

@module("react-native") @return(nullable)

7+

external useColorScheme: unit => option<t> = "useColorScheme"

88
99

@module("react-native") @scope("Appearance")

1010

external addChangeListener: (unit => unit) => EventSubscription.t = "addChangeListener"