@storybook/csf 0.0.2-next.5 → 0.0.2-next.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +11 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Simplify, UnionToIntersection } from 'type-fest';
|
1
|
+
import { Simplify, RemoveIndexSignature, UnionToIntersection } from 'type-fest';
|
2
2
|
|
3
3
|
interface SBBaseType {
|
4
4
|
required?: boolean;
|
@@ -54,6 +54,9 @@ interface StoryIdentifier {
|
|
54
54
|
interface Parameters {
|
55
55
|
[name: string]: any;
|
56
56
|
}
|
57
|
+
interface StrictParameters {
|
58
|
+
[name: string]: unknown;
|
59
|
+
}
|
57
60
|
declare type ConditionalTest = {
|
58
61
|
truthy?: boolean;
|
59
62
|
} | {
|
@@ -81,9 +84,12 @@ interface StrictInputType extends InputType {
|
|
81
84
|
name: string;
|
82
85
|
type?: SBType;
|
83
86
|
}
|
84
|
-
|
87
|
+
interface Args {
|
85
88
|
[name: string]: any;
|
86
|
-
}
|
89
|
+
}
|
90
|
+
interface StrictArgs {
|
91
|
+
[name: string]: unknown;
|
92
|
+
}
|
87
93
|
declare type ArgTypes<TArgs = Args> = {
|
88
94
|
[name in keyof TArgs]: InputType;
|
89
95
|
};
|
@@ -307,7 +313,7 @@ declare type ArgsFromMeta<TRenderer extends Renderer, Meta> = Meta extends {
|
|
307
313
|
render?: ArgsStoryFn<TRenderer, infer RArgs>;
|
308
314
|
loaders?: (infer Loaders)[];
|
309
315
|
decorators?: (infer Decorators)[];
|
310
|
-
} ? Simplify<RArgs & DecoratorsArgs<TRenderer, Decorators> & LoaderArgs<TRenderer, Loaders
|
316
|
+
} ? Simplify<RemoveIndexSignature<RArgs & DecoratorsArgs<TRenderer, Decorators> & LoaderArgs<TRenderer, Loaders>>> : unknown;
|
311
317
|
declare type DecoratorsArgs<TRenderer extends Renderer, Decorators> = UnionToIntersection<Decorators extends DecoratorFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
|
312
318
|
declare type LoaderArgs<TRenderer extends Renderer, Loaders> = UnionToIntersection<Loaders extends LoaderFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
|
313
319
|
|
@@ -352,4 +358,4 @@ declare const parseKind: (kind: string, { rootSeparator, groupSeparator }: Separ
|
|
352
358
|
groups: string[];
|
353
359
|
};
|
354
360
|
|
355
|
-
export { AnnotatedStoryFn, AnyFramework, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, ProjectAnnotations, Renderer, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictGlobalTypes, StrictInputType, Tag, ViewMode, includeConditionalArg, isExportStory, parseKind, sanitize, storyNameFromExport, toId };
|
361
|
+
export { AnnotatedStoryFn, AnyFramework, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, ProjectAnnotations, Renderer, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, StrictParameters, Tag, ViewMode, includeConditionalArg, isExportStory, parseKind, sanitize, storyNameFromExport, toId };
|