Skip to content

Commit b514498

Browse files
authored
fix: types of sdk.editor & sdk.navigator (#1441)
* fix: types of sdk.editor * fix: types of sdk.navigator
1 parent c0e2757 commit b514498

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/types/api.types.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ export interface EditorLocaleSettings {
125125
export interface SharedEditorSDK {
126126
editor: {
127127
editorInterface: EditorInterface
128-
onLocaleSettingsChanged: (callback: (value: EditorLocaleSettings) => any) => Function
129-
onShowDisabledFieldsChanged: (callback: (value: boolean) => any) => Function
128+
onLocaleSettingsChanged: (
129+
callback: (localeSettings: EditorLocaleSettings) => void
130+
) => () => void
131+
onShowDisabledFieldsChanged: (callback: (showDisabledFields: boolean) => any) => () => void
130132
}
131133
/** Allows to read and update the value of any field of the current entry and to get the entry's metadata */
132134
entry: EntryAPI

lib/types/navigator.types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ export interface NavigatorAPI {
7676
openAppConfig: () => Promise<void>
7777
openEntriesList: () => Promise<void>
7878
openAssetsList: () => Promise<void>
79-
onSlideInNavigation: (fn: (slide: NavigatorSlideInfo) => void) => Function
79+
onSlideInNavigation: (fn: (slide: NavigatorSlideInfo) => void) => () => void
8080
}

0 commit comments

Comments
 (0)