tsukiko • Docs
tsukiko / TsuError
Error
new TsuError(
type
,str
,data
?):TsuError
• type: langType
• str: "not_string"
| "not_a_email"
| "not_a_domain"
| "not_a_url"
| "illegal_match_string"
| "illegal_starts_with"
| "illegal_ends_with"
| "too_long"
| "too_short"
| "not_number"
| "not_integer_number"
| "not_odd_number"
| "not_even_number"
| "not_natural_number"
| "not_positive_number"
| "not_negative_number"
| "not_percentage"
| "too_bigger"
| "too_bigger_has"
| "too_smaller"
| "too_smaller_has"
| "not_multiple_number"
| "is_a_NaN"
| "not_boolean"
| "not_true"
| "not_false"
| "not_null"
| "not_undefined"
| "not_never"
| "not_an_array"
| "array_error"
| "too_many_items"
| "too_few_items"
| "not_a_tuple"
| "illegal_tuple_length"
| "tuple_error"
| "not_an_object"
| "object_is_null"
| "object_is_an_array"
| "object_not_instance_of_constructor"
| "object_keys_too_many"
| "object_keys_too_few"
| "object_error"
| "object_key_error"
| "intersection_error"
| "union_error"
| "literal_only"
| "literal_number_error"
| "literal_string_error"
| "literal_boolean_error"
| "custom_error"
| "not_a_function"
| "not_a_constructor"
| "not_an_async_function"
| "not_a_generator_function"
| "not_an_async_generator_function"
| "not_an_arrow_function"
| "function_args_count_mismatch"
| "function_name_mismatch"
| "not_a_class"
| "class_args_count_mismatch"
| "class_name_mismatch"
| "class_prototype_error"
• data?
Error.constructor
optional
cause:unknown
Error.cause
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:24
message:
string
Error.message
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077
name:
string
Error.name
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076
optional
stack:string
Error.stack
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078
static
optional
prepareStackTrace: (err
,stackTraces
) =>any
Optional override for formatting stack traces
• err: Error
• stackTraces: CallSite
[]
any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Error.prepareStackTrace
node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:11
static
stackTraceLimit:number
Error.stackTraceLimit
node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:13
static
captureStackTrace(targetObject
,constructorOpt
?):void
Create .stack property on a target object
• targetObject: object
• constructorOpt?: Function
void
Error.captureStackTrace
node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:4