UNPKG

1.74 kBTypeScriptView Raw
1import { Provider } from '@angular/core';
2import { ApplicationConfig } from '@angular/platform-browser';
3import { Parameters as DefaultParameters, StoryContext as DefaultStoryContext, WebRenderer } from '@storybook/types';
4export interface NgModuleMetadata {
5 /**
6 * List of components, directives, and pipes that belong to your component.
7 */
8 declarations?: any[];
9 entryComponents?: any[];
10 /**
11 * List of modules that should be available to the root Storybook Component and all its children.
12 * If you want to register application providers or if you want to use the forRoot() pattern, please use the `applicationConfig` decorator in combination with the importProvidersFrom helper function from @angular/core instead.
13 */
14 imports?: any[];
15 schemas?: any[];
16 /**
17 * List of providers that should be available on the root component and all its children.
18 * Use the `applicationConfig` decorator to register environemt and application-wide providers.
19 */
20 providers?: Provider[];
21}
22export interface ICollection {
23 [p: string]: any;
24}
25export interface StoryFnAngularReturnType {
26 props?: ICollection;
27 moduleMetadata?: NgModuleMetadata;
28 applicationConfig?: ApplicationConfig;
29 template?: string;
30 styles?: string[];
31 userDefinedTemplate?: boolean;
32}
33/**
34 * @deprecated Use `AngularRenderer` instead.
35 */
36export type AngularFramework = AngularRenderer;
37export interface AngularRenderer extends WebRenderer {
38 component: any;
39 storyResult: StoryFnAngularReturnType;
40}
41export type Parameters = DefaultParameters & {
42 bootstrapModuleOptions?: unknown;
43};
44export type StoryContext = DefaultStoryContext<AngularRenderer> & {
45 parameters: Parameters;
46};