Skip to content

Commit

Permalink
fix: fix default type of newStory
Browse files Browse the repository at this point in the history
  • Loading branch information
schabibi1 committed Jul 22, 2022
1 parent e8e035a commit 2122996
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import {
StoryblokBridgeV2,
StoryData,
SbInitResult,
StoryblokComponentType
} from "./types";

const bridgeLatest = "https://app.storyblok.com/f/storyblok-v2-latest.js";

export const useStoryblokBridge = <T = void>(
export const useStoryblokBridge = <T extends StoryblokComponentType<string> = any>(
id: Number,
cb: (newStory: StoryData<T>) => void,
options: StoryblokBridgeConfigV2 = {}
Expand Down

0 comments on commit 2122996

Please sign in to comment.