[ACS-6071] fix JSDoc issues for Core lib (#8942)

* fix jsdoc issues

* docs fixes

* doc fixes

* doc fixes

* fix docs

* fix bugs
This commit is contained in:
Denys Vuika
2023-09-28 14:00:30 +01:00
committed by GitHub
parent d7e0bb6cd3
commit 65d70bffb2
46 changed files with 280 additions and 79 deletions

View File

@@ -29,6 +29,13 @@ type NonFunctionPropertyNames<T> = {[K in keyof T]: T[K] extends () => any ? nev
type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
type StoryWithoutFunction<T> = NonFunctionProperties<Story<T>>;
/**
* Copy storybook story
*
* @param story story
* @param annotations annotations
* @returns a copy of the story
*/
function storybookCopyStory<T>( story: Story<T>, annotations?: StoryWithoutFunction<T> ): Story<T> {
const cloned = story.bind({});
return Object.assign(cloned, annotations);