mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
Merge pull request #19123 from SimenB/patch-1
fix: type `storyIdToEntry` explicitly
This commit is contained in:
commit
11ec40bfcf
@ -28,6 +28,7 @@ import type {
|
||||
PromiseLike,
|
||||
StoryIndex,
|
||||
V2CompatIndexEntry,
|
||||
IndexEntry,
|
||||
StoryIndexV3,
|
||||
ModuleExports,
|
||||
} from './types';
|
||||
@ -126,7 +127,7 @@ export class StoryStore<TFramework extends AnyFramework> {
|
||||
}
|
||||
|
||||
// Get an entry from the index, waiting on initialization if necessary
|
||||
async storyIdToEntry(storyId: StoryId) {
|
||||
async storyIdToEntry(storyId: StoryId): Promise<IndexEntry> {
|
||||
await this.initializationPromise;
|
||||
// The index will always be set before the initialization promise returns
|
||||
return this.storyIndex!.storyIdToEntry(storyId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user