UNPKG

@sudoo/marked

Version:

JavaScript & TypeScript code runner in JavaScript, safe with marked territory, asynchronous

100 lines (99 loc) 9.59 kB
"use strict"; /** * @author WMXPY * @namespace Declare * @description Error List */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ERROR_LIST = void 0; const error_code_1 = require("./error-code"); exports.ERROR_LIST = { [error_code_1.ERROR_CODE.UNKNOWN_ERROR]: "Unknown error", // 1000 [error_code_1.ERROR_CODE.SCRIPT_CANNOT_BE_NULL_OR_UNDEFINED]: "Script cannot be null or undefined", // 1001 [error_code_1.ERROR_CODE.PARSE_ERROR]: "Parse error", // 1100 [error_code_1.ERROR_CODE.TYPESCRIPT_COMPILE_ERROR]: "Typescript compile error", // 1101 [error_code_1.ERROR_CODE.MAXIMUM_CODE_LENGTH_LIMIT_EXCEED]: "Maximum code length limit exceed", // 1911 [error_code_1.ERROR_CODE.MAXIMUM_EXPRESSION_LIMIT_EXCEED]: "Maximum expression limit exceed", // 1912 [error_code_1.ERROR_CODE.MAXIMUM_FOR_LOOP_LIMIT_EXCEED]: "Maximum for loop limit exceed", // 1913 [error_code_1.ERROR_CODE.MAXIMUM_FOR_OF_LOOP_LIMIT_EXCEED]: "Maximum for of loop limit exceed", // 1914 [error_code_1.ERROR_CODE.MAXIMUM_FOR_IN_LOOP_LIMIT_EXCEED]: "Maximum for in loop limit exceed", // 1915 [error_code_1.ERROR_CODE.MAXIMUM_WHILE_LOOP_LIMITED_EXCEED]: "Maximum while loop limited exceed", // 1916 [error_code_1.ERROR_CODE.MAXIMUM_DO_WHILE_LOOP_LIMITED_EXCEED]: "Maximum do while loop limited exceed", // 1917 [error_code_1.ERROR_CODE.ASSERT_EXIST_ELEMENT_NOT_EXIST]: "Assert exist element not exist", // 2065 [error_code_1.ERROR_CODE.ASSERT_BOOLEAN_OPPOSITE]: "Assert boolean opposite", // 2066 [error_code_1.ERROR_CODE.ASSERT_TYPE_NOT_MATCHED]: "Assert type not matched", // 2067 [error_code_1.ERROR_CODE.NEW_STATEMENT_SHOULD_CALL_ON_CLASS_ONLY]: "New statement should call on class only", // 2100 [error_code_1.ERROR_CODE.FOR_OF_LOOP_ONLY_FOR_LIST]: "For of loop only for list", // 2387 [error_code_1.ERROR_CODE.FOR_IN_LOOP_ONLY_FOR_MAP]: "For in loop only for map", // 2388 [error_code_1.ERROR_CODE.ONLY_NUMBER_AVAILABLE_FOR_LIST]: "Only number available for list", // 2391 [error_code_1.ERROR_CODE.ONLY_STRING_AVAILABLE_FOR_MAP]: "Only string available for map", // 2392 [error_code_1.ERROR_CODE.ONLY_STRING_AVAILABLE_FOR_CLASS]: "Only string available for class", // 2393 [error_code_1.ERROR_CODE.ONLY_STRING_AVAILABLE_FOR_CLASS_INSTANCE]: "Only string available for class instance", // 2394 [error_code_1.ERROR_CODE.ONLY_STRING_AVAILABLE_FOR_REGEXP]: "Only string available for RegExp", // 2395 [error_code_1.ERROR_CODE.ONLY_STRING_AVAILABLE_FOR_BIGINT]: "Only string available for bigint", // 2396 [error_code_1.ERROR_CODE.STRING_METHOD_NOT_FOUND]: "String method not found", // 2397 [error_code_1.ERROR_CODE.NUMBER_METHOD_NOT_FOUND]: "Number method not found", // 2398 [error_code_1.ERROR_CODE.BOOLEAN_METHOD_NOT_FOUND]: "Boolean method not found", // 2399 [error_code_1.ERROR_CODE.FUNCTION_METHOD_NOT_FOUND]: "Function method not found", // 2400 [error_code_1.ERROR_CODE.LIST_FILTER_ARGUMENT_SHOULD_BE_A_FUNCTION]: "List Filter argument should be a function", // 2410 [error_code_1.ERROR_CODE.LIST_FOR_EACH_ARGUMENT_SHOULD_BE_A_FUNCTION]: "List For Each argument should be a function", // 2411 [error_code_1.ERROR_CODE.LIST_MAP_ARGUMENT_SHOULD_BE_A_FUNCTION]: "List Map argument should be a function", // 2412 [error_code_1.ERROR_CODE.LIST_REDUCE_ARGUMENT_SHOULD_BE_A_FUNCTION]: "List Reduce argument should be a function", // 2413 [error_code_1.ERROR_CODE.VAR_DECLARATION_NOT_SUPPORT]: "Var declaration not support", // 3003 [error_code_1.ERROR_CODE.BINARY_NOT_SUPPORT]: "Binary not support", // 3004 [error_code_1.ERROR_CODE.UNARY_NOT_SUPPORT]: "Unary not support", // 3005 [error_code_1.ERROR_CODE.LOGICAL_NOT_SUPPORT]: "Logical not support", // 3006 [error_code_1.ERROR_CODE.ASSIGNMENT_NOT_SUPPORT]: "Assignment not support", // 3007 [error_code_1.ERROR_CODE.UNDEFINED_TEST_NOT_SUPPORT]: "Undefined test not support", // 3008 [error_code_1.ERROR_CODE.BESIDES_DECLARATION_NOT_SUPPORT]: "Besides declaration not support", // 3009 [error_code_1.ERROR_CODE.UNDEFINED_BESIDES_DECLARATION_NOT_SUPPORT]: "Undefined besides declaration not support", // 3010 [error_code_1.ERROR_CODE.BREAK_LABEL_IS_NOT_SUPPORT]: "Break label is not support", // 3061 [error_code_1.ERROR_CODE.CONTINUE_LABEL_IS_NOT_SUPPORT]: "Continue label is not support", // 3062 [error_code_1.ERROR_CODE.CONSTANT_VARIABLE_CANNOT_BE_EDITED]: "Constant variable cannot be edited", // 3081 [error_code_1.ERROR_CODE.IMMUTABLE_VARIABLE_CANNOT_BE_EDITED]: "Immutable variable cannot be edited", // 3082 [error_code_1.ERROR_CODE.EXPORT_NAMED_NOT_SUPPORT]: "Export not default variable is not support", // 3107 [error_code_1.ERROR_CODE.EXPORT_TYPE_OTHER_THAN_N_S_B_NOT_SUPPORT]: "Export is only available for number, string and boolean", // 3108 [error_code_1.ERROR_CODE.IMPORT_ONLY_AVAILABLE_IN_ROOT_SCOPE]: "Import only available in root scope", // 3112 [error_code_1.ERROR_CODE.IMPORT_OBJECT_NOT_FOUND]: "Import object not found", // 3113 [error_code_1.ERROR_CODE.IMPORT_NAMESPACE_IS_NOT_AN_OBJECT]: "Import namespace is not an object", // 3114 [error_code_1.ERROR_CODE.IMPORT_DEFAULT_OBJECT_HAVE_NO_DEFAULT_EXPORT]: "Import default object have no default export", // 3115 [error_code_1.ERROR_CODE.PROPERTY_KIND_NOT_INIT_NOT_SUPPORT]: "Define get or set to a object is not supported", // 3151 [error_code_1.ERROR_CODE.NEGATIVE_UNARY_ONLY_AVAILABLE_FOR_VALID_NUMBER]: "Negative unary only available for valid number", // 3310 [error_code_1.ERROR_CODE.POSITIVE_UPDATE_ONLY_AVAILABLE_FOR_VALID_NUMBER]: "Positive update only available for valid number", // 3320 [error_code_1.ERROR_CODE.IN_BINARY_OPERATION_ONLY_ALLOW_ON_MAP_OR_CLASS]: "In binary operation only allow on map or class", // 3330 [error_code_1.ERROR_CODE.IN_BINARY_OPERATION_ONLY_ALLOW_ON_IDENTIFIER]: "In binary operation only allow on identifier", // 3331 [error_code_1.ERROR_CODE.INSTANCE_OF_BINARY_OPERATION_LEFT_ONLY_ALLOW_ON_CLASS_INSTANCE]: "Instance of binary operation left only allow on class instance", // 3332 [error_code_1.ERROR_CODE.INSTANCE_OF_BINARY_OPERATION_RIGHT_ONLY_ALLOW_ON_CLASS]: "Instance of binary operation right only allow on class", // 3333 [error_code_1.ERROR_CODE.UNKNOWN_LANGUAGE]: "Unknown language", // 4050 [error_code_1.ERROR_CODE.DEBUGGER_WITHOUT_DEBUG_INTERCEPTOR]: "Debugger without debug interceptor", // 5301 [error_code_1.ERROR_CODE.UNMOUNTED_AST_TYPE]: "Unmounted ast type", // 6001 [error_code_1.ERROR_CODE.DUPLICATED_PROVIDED_MODULE_NAME]: "Provided module name duplicated", // 6002 [error_code_1.ERROR_CODE.MODULE_IS_NOT_PROVIDED]: "Module is not provided", // 6003 [error_code_1.ERROR_CODE.CYCLED_IMPORT]: "Cycled import", // 6004 [error_code_1.ERROR_CODE.UNNECESSARY_ASYNC_EXPRESSION]: "Unnecessary async expression", // 6005 [error_code_1.ERROR_CODE.UNNECESSARY_AWAIT_EXPRESSION]: "Unnecessary await expression", // 6006 [error_code_1.ERROR_CODE.CANNOT_TRANSFER_CLASS_TO_NATIVE]: "Cannot transfer class to native", // 6100 [error_code_1.ERROR_CODE.CANNOT_TRANSFER_FUNCTION_TO_NATIVE]: "Cannot transfer function to native", // 6101 [error_code_1.ERROR_CODE.CANNOT_TRANSFER_NATIVE_TO_CLASS]: "Cannot transfer native to class", // 6105 [error_code_1.ERROR_CODE.CANNOT_TRANSFER_NATIVE_TO_CLASS_INSTANCE]: "Cannot transfer native to class instance", // 6106 [error_code_1.ERROR_CODE.CANNOT_READ_PROPERTY_OF_UNDEFINED]: "Cannot read property of undefined", // 6110 [error_code_1.ERROR_CODE.CANNOT_READ_PROPERTY_OF_NULL]: "Cannot read property of null", // 6111 [error_code_1.ERROR_CODE.MEMBER_EXPRESSION_VALUE_CANNOT_BE_UNDEFINED]: "Member expression value cannot be undefined", // 6121 [error_code_1.ERROR_CODE.DECLARATION_INIT_TYPE_NOT_MATCHED]: "Declaration init type not matched", // 6201 [error_code_1.ERROR_CODE.DECLARATION_INIT_SIZE_NOT_MATCHED]: "Declaration init size not matched", // 6202 [error_code_1.ERROR_CODE.CANNOT_FIND_ORIGINAL_POSITION_FROM_LINE]: "Cannot find original position from line", // 6301 [error_code_1.ERROR_CODE.CANNOT_FIND_ORIGINAL_POSITION_FROM_COLUMN]: "Cannot find original position from column", // 6302 [error_code_1.ERROR_CODE.DUPLICATED_VARIABLE]: "Duplicated variable declaration", // 7005 [error_code_1.ERROR_CODE.VARIABLE_IS_NOT_DEFINED]: "Variable is not defined", // 7102 [error_code_1.ERROR_CODE.TRACE_SHOULD_BE_CLASS_TRACE]: "Trace should be class trace", // 7201 [error_code_1.ERROR_CODE.PROPERTY_SHOULD_BE_IDENTIFIER]: "Property should be identifier", // 7301 [error_code_1.ERROR_CODE.CANNOT_DIVIDE_BY_ZERO]: "Cannot divide by zero", // 7302 [error_code_1.ERROR_CODE.CANNOT_PERFORM_ACTION_ON_NON_NUMBER]: "Cannot perform action on non-number", // 7303 [error_code_1.ERROR_CODE.CATCH_NOT_FOUND]: "Catch not found", // 7501 [error_code_1.ERROR_CODE.SANDBOX_IS_BROKE]: "Sandbox is broke", // 7800 [error_code_1.ERROR_CODE.CANNOT_CALL_MEMBER_FUNCTION_OF_UNDEFINED]: "Cannot call member function of undefined", // 8001 [error_code_1.ERROR_CODE.CANNOT_CALL_TAGGED_TEMPLATE_EXPRESSION_OF_UNDEFINED]: "Cannot call tagged template expression of undefined", // 8002 [error_code_1.ERROR_CODE.CANNOT_SPREAD_OTHER_THAN_ARRAY]: "Cannot spread other than array", // 8101 [error_code_1.ERROR_CODE.CANNOT_SPREAD_OTHER_THAN_MAP]: "Cannot spread other than map", // 8102 [error_code_1.ERROR_CODE.INTERNAL_ERROR]: "Internal error", // 9001 };