@modern-js/module-tools
Version:
Simple, powerful, high-performance modern npm package development solution.
33 lines (32 loc) • 1.06 kB
TypeScript
import type { ExecaError } from '@modern-js/utils';
import type { BuildType, Format, Target } from './types';
export declare const padSpaceWith: (str: string, targetL: number, opts?: {
endStr?: string;
style?: (s: string) => string;
}) => string;
export declare class InternalBuildError extends Error {
buildType: BuildType;
target: Target;
format: Format;
constructor(e: Error, opts: {
buildType: BuildType;
format: Format;
target: Target;
});
toString(): string;
formatError(): string[];
}
export declare class InternalDTSError extends Error {
buildType: BuildType;
private e;
constructor(e: Error | ExecaError, opts: {
buildType: BuildType;
});
toString(): string;
formatError(): string[];
}
export declare class ModuleBuildError extends Error {
constructor(e: InternalBuildError | InternalDTSError);
}
export declare const isInternalError: (e: unknown) => e is InternalDTSError | InternalBuildError;
export declare const isExecaError: (e: any) => e is ExecaError;