Skip to content

Commit

Permalink
remove unnecessary trailing unit
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddy03h committed Jan 18, 2025
1 parent 923ff7f commit 4d8df45
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Core.res
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/Drawer.res
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/NativeStack.res
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
Expand Down
4 changes: 2 additions & 2 deletions src/NavigationActions.res
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/Stack.res
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
Expand Down

0 comments on commit 4d8df45

Please sign in to comment.