@storybook/core-events
Version:
Event names used in storybook core
80 lines (77 loc) • 2.99 kB
TypeScript
import { S as StorybookError } from '../storybook-error-bd6b4f1e.js';
/**
* If you can't find a suitable category for your error, create one
* based on the package name/file path of which the error is thrown.
* For instance:
* If it's from @storybook/node-logger, then NODE-LOGGER
* If it's from a package that is too broad, e.g. @storybook/cli in the init command, then use a combination like CLI_INIT
*/
declare enum Category {
CLI = "CLI",
CLI_INIT = "CLI_INIT",
CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE",
CLI_UPGRADE = "CLI_UPGRADE",
CLI_ADD = "CLI_ADD",
CODEMOD = "CODEMOD",
CORE_SERVER = "CORE-SERVER",
CSF_PLUGIN = "CSF-PLUGIN",
CSF_TOOLS = "CSF-TOOLS",
CORE_COMMON = "CORE-COMMON",
NODE_LOGGER = "NODE-LOGGER",
TELEMETRY = "TELEMETRY",
BUILDER_MANAGER = "BUILDER-MANAGER",
BUILDER_VITE = "BUILDER-VITE",
BUILDER_WEBPACK5 = "BUILDER-WEBPACK5",
SOURCE_LOADER = "SOURCE-LOADER",
POSTINSTALL = "POSTINSTALL",
DOCS_TOOLS = "DOCS-TOOLS",
CORE_WEBPACK = "CORE-WEBPACK"
}
declare class NxProjectDetectedError extends StorybookError {
readonly category = Category.CLI_INIT;
readonly code = 1;
readonly documentation = "https://nx.dev/packages/storybook";
template(): string;
}
declare class MissingFrameworkFieldError extends StorybookError {
readonly category = Category.CORE_COMMON;
readonly code = 1;
readonly documentation = "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api";
template(): string;
}
declare class InvalidFrameworkNameError extends StorybookError {
data: {
frameworkName: string;
};
readonly category = Category.CORE_COMMON;
readonly code = 2;
readonly documentation = "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api";
constructor(data: {
frameworkName: string;
});
template(): string;
}
declare class CouldNotEvaluateFrameworkError extends StorybookError {
data: {
frameworkName: string;
};
readonly category = Category.CORE_COMMON;
readonly code = 3;
constructor(data: {
frameworkName: string;
});
template(): string;
}
declare class ConflictingStaticDirConfigError extends StorybookError {
readonly category = Category.CORE_SERVER;
readonly code = 1;
readonly documentation = "https://storybook.js.org/docs/react/configure/images-and-assets#serving-static-files-via-storybook-configuration";
template(): string;
}
declare class InvalidStoriesEntryError extends StorybookError {
readonly category = Category.CORE_COMMON;
readonly code = 4;
readonly documentation = "https://storybook.js.org/docs/react/faq#can-i-have-a-storybook-with-no-local-stories";
template(): string;
}
export { Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, InvalidFrameworkNameError, InvalidStoriesEntryError, MissingFrameworkFieldError, NxProjectDetectedError };