unbag
Version:
一个专门用来开发npm工具的包
28 lines (27 loc) • 724 B
TypeScript
import { FinalUserConfig } from "./config";
export declare enum LogTypeEnum {
Info = "Info",
Warn = "Warn",
Error = "Error",
Debug = "Debug"
}
export interface LogConfig {
disabled: boolean;
debug?: boolean;
console: (params: {
finalUserConfig: FinalUserConfig;
type: LogTypeEnum;
message: any;
}) => void;
catchThrowError: (error: any) => void;
}
export declare const LogConfigDefault: LogConfig;
export declare const useLog: (params: {
finalUserConfig: FinalUserConfig;
}) => {
info: (message: any) => void;
warn: (message: any) => void;
error: (message: any) => void;
debug: (message: any) => void;
catchThrowError: (e: any) => void;
};