import { start } from "@storybook/core/client" ; import { ClientStoryApi , Loadable } from "@storybook/addons" ; import "./globals" ; import render from "./render" ; import { StoryFnKnockoutReturnType , IStorybookSection } from "./types" ; const framework = "knockout" ; interface ClientApi extends ClientStoryApi < StoryFnKnockoutReturnType > { setAddon ( addon ) : void ; configure ( loader , module ) : void ; getStorybook ( ) : IStorybookSection [ ] ; clearDecorators ( ) : void ; forceReRender ( ) : void ; raw : ( ) => any ; } const api = start ( render ) ; export const storiesOf = ( kind , m ) => { return ( api . clientApi . storiesOf ( kind , m ) as ReturnType < ClientApi [ "storiesOf" ] > ) . addParameters ( { framework } ) ; } ; export const configure = ( ... args ) => api . configure ( framework , ... args ) ; export const addDecorator = api . clientApi . addDecorator ; export const addParameters = api . clientApi . addParameters ; export const clearDecorators = api . clientApi . clearDecorators ; export const setAddon = api . clientApi . setAddon ; export const forceReRender = api . forceReRender ; export const getStorybook = api . clientApi . getStorybook ; export const raw = api . clientApi . raw ;