diff --git a/src/story.ts b/src/story.ts index 7d4c97a..df41a93 100644 --- a/src/story.ts +++ b/src/story.ts @@ -390,7 +390,11 @@ export type ProjectAnnotations< > = BaseAnnotations & { argsEnhancers?: ArgsEnhancer[]; argTypesEnhancers?: ArgTypesEnhancer[]; + /** + * @deprecated Project `globals` renamed to `initiaGlobals` + */ globals?: Globals; + initialGlobals?: Globals; globalTypes?: GlobalTypes; applyDecorators?: DecoratorApplicator; runStep?: StepRunner; @@ -490,6 +494,11 @@ export interface ComponentAnnotations; + + /** + * Override the globals values for all stories in this component + */ + globals?: Globals; } export type StoryAnnotations< @@ -512,6 +521,11 @@ export type StoryAnnotations< */ play?: PlayFunction; + /** + * Override the globals values for this story + */ + globals?: Globals; + /** @deprecated */ story?: Omit, 'story'>; // eslint-disable-next-line @typescript-eslint/ban-types