Skip to content

Commit

Permalink
Merge pull request #97 from schabibi1/main
Browse files Browse the repository at this point in the history
fix: fix default type of newStory
  • Loading branch information
schabibi1 authored Jul 22, 2022
2 parents 44027bf + 2122996 commit 7fac886
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 7fac886

Please sign in to comment.