UNPKG

950 BTypeScriptView Raw
1/**
2 * This error should be thrown from a Builder in
3 * order to stop the build and print a message.
4 * This is necessary to avoid printing a stack trace.
5 */
6export declare class NowBuildError extends Error {
7 hideStackTrace: boolean;
8 code: string;
9 link?: string;
10 action?: string;
11 constructor({ message, code, link, action }: Props);
12}
13interface Props {
14 /**
15 * The error message to display to the end-user.
16 * Should be short yet descriptive of what they did wrong.
17 */
18 message: string;
19 /**
20 * A unique error code for this particular error.
21 * Should start with the builder name such as `NODE_`.
22 */
23 code: string;
24 /**
25 * Optional hyperlink starting with https://vercel.com to
26 * link to more information about this error.
27 */
28 link?: string;
29 /**
30 * Optional "action" to display before the `link`, such as "More details".
31 */
32 action?: string;
33}
34export {};