Skip to content

Commit

Permalink
Merge pull request #19123 from SimenB/patch-1
Browse files Browse the repository at this point in the history
fix: type `storyIdToEntry` explicitly
  • Loading branch information
ndelangen authored Sep 13, 2022
2 parents 7f7a354 + 7b329aa commit 11ec40b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/lib/store/src/StoryStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import type {
PromiseLike,
StoryIndex,
V2CompatIndexEntry,
IndexEntry,
StoryIndexV3,
ModuleExports,
} from './types';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 11ec40b

Please sign in to comment.