From 4d8df4598dcc128c7feb59110f89d799b4761728 Mon Sep 17 00:00:00 2001 From: Freddy Harris Date: Sat, 18 Jan 2025 16:41:22 +0100 Subject: [PATCH] remove unnecessary trailing unit --- src/Core.res | 6 +++--- src/Drawer.res | 2 +- src/NativeStack.res | 4 ++-- src/NavigationActions.res | 4 ++-- src/Stack.res | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Core.res b/src/Core.res index 0513280..ea3117c 100644 --- a/src/Core.res +++ b/src/Core.res @@ -70,19 +70,19 @@ module Navigation = { @send external navigateDeprecated: (t, string, ~params: 'params=?) => unit = "navigateDeprecated" - @send external goBack: (navigation, unit) => unit = "goBack" + @send external goBack: navigation => unit = "goBack" @send external reset: (navigation, navigationState) => unit = "reset" @send external preload: (t, string, ~params: 'params=?) => unit = "preload" - @send external isFocused: (navigation, unit) => bool = "isFocused" + @send external isFocused: navigation => bool = "isFocused" @send external dispatch: (t, action) => unit = "dispatch" - @send external canGoBack: (navigation, unit) => bool = "canGoBack" + @send external canGoBack: navigation => bool = "canGoBack" @send external setParams: (navigation, 'params) => unit = "setParams" diff --git a/src/Drawer.res b/src/Drawer.res index b13914e..8bba418 100644 --- a/src/Drawer.res +++ b/src/Drawer.res @@ -148,7 +148,7 @@ module Navigation = { @send external setOptions: (navigation, options) => unit = "setOptions" - @send external jumpTo: (navigation, ~name: string, ~params: 'params=?, unit) => unit = "jumpTo" + @send external jumpTo: (navigation, ~name: string, ~params: 'params=?) => unit = "jumpTo" @send external openDrawer: navigation => unit = "openDrawer" @send external closeDrawer: navigation => unit = "closeDrawer" @send external toggleDrawer: navigation => unit = "toggleDrawer" diff --git a/src/NativeStack.res b/src/NativeStack.res index c3cb3f5..5e964de 100644 --- a/src/NativeStack.res +++ b/src/NativeStack.res @@ -232,11 +232,11 @@ module Navigation = { @deprecated("Use `push` with `~params` instead") @send external pushWithParams: (navigation, string, 'params) => unit = "push" - @send external pop: (navigation, ~count: int=?, unit) => unit = "pop" + @send external pop: (navigation, ~count: int=?) => unit = "pop" @send external popTo: (navigation, string, ~params: 'params=?) => unit = "popTo" - @send external popToTop: (navigation, unit) => unit = "popToTop" + @send external popToTop: navigation => unit = "popToTop" @send external addEventListener: ( diff --git a/src/NavigationActions.res b/src/NavigationActions.res index fa9081e..9d76f03 100644 --- a/src/NavigationActions.res +++ b/src/NavigationActions.res @@ -3,12 +3,12 @@ type action type navigateParams @obj -external navigateParams: (~routeName: string, ~params: {..}=?, unit) => navigateParams = "" +external navigateParams: (~routeName: string, ~params: {..}=?) => navigateParams = "" type backParams @obj -external backParams: (~key: string=?, ~immediate: bool=?, unit) => navigateParams = "" +external backParams: (~key: string=?, ~immediate: bool=?) => navigateParams = "" @module("react-navigation") @scope("NavigationActions") external navigate: navigateParams => action = "navigate" diff --git a/src/Stack.res b/src/Stack.res index c1a85f3..ce5eaf3 100644 --- a/src/Stack.res +++ b/src/Stack.res @@ -216,11 +216,11 @@ module Navigation = { @deprecated("Use `push` with `~params` instead") @send external pushWithParams: (navigation, string, 'params) => unit = "push" - @send external pop: (navigation, ~count: int=?, unit) => unit = "pop" + @send external pop: (navigation, ~count: int=?) => unit = "pop" @send external popTo: (navigation, string, ~params: 'params=?) => unit = "popTo" - @send external popToTop: (navigation, unit) => unit = "popToTop" + @send external popToTop: navigation => unit = "popToTop" @send external addEventListener: (