comptime.ts
Version:
<div align="center"> <img src="https://raw.githubusercontent.com/feathers-studio/comptime.ts/master/docs/comptime.ts.svg" alt="Hyperactive"> </div>
24 lines (23 loc) • 1.34 kB
TypeScript
import type { Options } from "boxen";
export declare let box: (text: string, options?: Options, skip?: boolean) => string;
export declare const COMPTIME_ERRORS: {
readonly CT_ERR_GET_EVALUATION: "CT_ERR_GET_EVALUATION";
readonly CT_ERR_SYNTAX_CHECK: "CT_ERR_SYNTAX_CHECK";
readonly CT_ERR_ERASE_TYPES: "CT_ERR_ERASE_TYPES";
readonly CT_ERR_CREATE_FUNCTION: "CT_ERR_CREATE_FUNCTION";
readonly CT_ERR_EVALUATE: "CT_ERR_EVALUATE";
readonly CT_ERR_NO_COMPTIME: "CT_ERR_NO_COMPTIME";
};
export type ComptimeErrorKind = (typeof COMPTIME_ERRORS)[keyof typeof COMPTIME_ERRORS];
export declare const COMPTIME_ERRORS_MESSAGES: {
readonly CT_ERR_GET_EVALUATION: "An error occurred while attempting to construct the comptime evaluation block.";
readonly CT_ERR_SYNTAX_CHECK: "Syntax error in comptime evaluation block.";
readonly CT_ERR_ERASE_TYPES: "Error occurred while erasing types.";
readonly CT_ERR_CREATE_FUNCTION: "Error occurred while creating a new Function.";
readonly CT_ERR_EVALUATE: "Error occurred while evaluating the expression.";
readonly CT_ERR_NO_COMPTIME: string;
};
export declare const getErr: (code: ComptimeErrorKind, context?: string) => string;
export declare class ComptimeError extends Error {
constructor(code: ComptimeErrorKind, context?: string, cause?: unknown);
}