Fix types

This commit is contained in:
Tom Coleman 2023-03-03 13:09:22 +11:00
parent 9663f911a2
commit 4f29a6d4ef
2 changed files with 16 additions and 13 deletions

View File

@ -96,6 +96,7 @@ export type State = layout.SubState &
globals.SubState &
RouterData &
API_OptionsData &
DeprecatedState &
Other;
export type API = addons.SubAPI &
@ -113,6 +114,21 @@ export type API = addons.SubAPI &
url.SubAPI &
Other;
interface DeprecatedState {
/**
* @deprecated use index
*/
storiesHash: API_IndexHash;
/**
* @deprecated use previewInitialized
*/
storiesConfigured: boolean;
/**
* @deprecated use indexError
*/
storiesFailed?: Error;
}
interface Other {
[key: string]: any;
}

View File

@ -56,19 +56,6 @@ type StoryUpdate = Pick<API_StoryEntry, 'parameters' | 'initialArgs' | 'argTypes
export interface SubState extends API_LoadedRefData {
storyId: StoryId;
viewMode: ViewMode;
/**
* @deprecated use index
*/
storiesHash: API_IndexHash;
/**
* @deprecated use previewInitialized
*/
storiesConfigured: boolean;
/**
* @deprecated use indexError
*/
storiesFailed?: Error;
}
export interface SubAPI {