Skip to content

Commit

Permalink
Get rid of @string/@int for polyvars (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Oct 5, 2022
1 parent 92e3c6f commit 6495093
Show file tree
Hide file tree
Showing 38 changed files with 390 additions and 954 deletions.
15 changes: 8 additions & 7 deletions src/apis/Alert.res
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ external alert: (
unit,
) => unit = "alert"

type type_ = [
| #default
| #"plain-text"
| #"secure-text"
| #"login-password"
]

@scope("Alert") @module("react-native")
external prompt: (
~title: string,
Expand All @@ -28,13 +35,7 @@ external prompt: (
| #callback(string => unit)
| #buttons(array<button>)
]=?,
~type_: @string
[
| #default
| @as("plain-text") #plainText
| @as("secure-text") #secureText
| @as("login-password") #loginPassword
]=?,
~type_: type_=?,
~defaultValue: string=?,
~keyboardType: string=?,
unit,
Expand Down

0 comments on commit 6495093

Please sign in to comment.