UNPKG

@ts-bridge/cli

Version:

Bridge the gap between ES modules and CommonJS modules with an easy-to-use alternative to `tsc`.

53 lines 1.89 kB
import type { SourceFile, Transformer } from 'typescript'; /** * Get an error message from an error object. * * @param errorObject - The error object. * @param verbose - Whether to enable verbose logging. * @returns The error message. */ export declare function getErrorMessage(errorObject: unknown, verbose?: boolean): string; /** * Log an error message. The message is prefixed with a red cross. * * @param errorObject - The error to log. * @param verbose - Whether to enable verbose logging. */ export declare function error(errorObject: unknown, verbose?: boolean): void; /** * Log a warning message. The message is prefixed with a yellow exclamation * mark. * * @param message - The warning message to log. */ export declare function warn(message: string): void; /** * Log an information message. The message is prefixed with a blue 'i'. * * @param message - The information message to log. */ export declare function info(message: string): void; /** * Log a success message. The message is prefixed with a green checkmark. * * @param message - The success message to log. */ export declare function success(message: string): void; /** * Log a generic message. The message is prefixed with a green arrow. * * @param message - The message to log. */ export declare function log(message: string): void; /** * Get a transformer function that logs the file that is being transformed. * * This transformer does not actually transform the source file. It just uses * TypeScript's transformer API to check which files are being transformed. * * @param baseDirectory - The base directory of the project. * @param verbose - Whether to enable verbose logging. * @returns The transformer function. */ export declare function getLoggingTransformer(baseDirectory: string, verbose?: boolean): () => Transformer<SourceFile>; //# sourceMappingURL=logging.d.ts.map