diff --git a/src/Native.bs.js b/src/Native.bs.js index c2f2abe..be7fc2e 100644 --- a/src/Native.bs.js +++ b/src/Native.bs.js @@ -1,6 +1,8 @@ 'use strict'; +var Linking = {}; + var NavigationContainer = {}; var ServerContainer = {}; @@ -9,6 +11,7 @@ var CommonActions = {}; var Link = {}; +exports.Linking = Linking; exports.NavigationContainer = NavigationContainer; exports.ServerContainer = ServerContainer; exports.CommonActions = CommonActions; diff --git a/src/Native.res b/src/Native.res index 3363a0b..da332ee 100644 --- a/src/Native.res +++ b/src/Native.res @@ -19,6 +19,22 @@ external darkTheme: theme = "DarkTheme" @module("@react-navigation/native") external useTheme: unit => theme = "useTheme" +module Linking = { + type rec config = { + path?: string, + exact?: bool, + initialRouteName?: string, + screens?: screens, + } + and screens = dict + + type t = { + enabled?: bool, + prefixes: array, + config?: config, + } +} + module NavigationContainer = { type state = Js.Json.t type navigationState = state => unit @@ -30,6 +46,7 @@ module NavigationContainer = { ~onStateChange: navigationState=?, ~onReady: unit => unit=?, ~theme: theme=?, + ~linking: Linking.t=?, ~children: React.element, ~independent: bool=?, ) => React.element = "NavigationContainer"