@isdk/ai-tool 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-PY6NRGZE.mjs +1 -0
- package/dist/funcs.d.mts +1 -1
- package/dist/funcs.d.ts +1 -1
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-nP9lSU6E.d.mts → index-DUEs7T8M.d.mts} +2 -2
- package/dist/{index-nP9lSU6E.d.ts → index-DUEs7T8M.d.ts} +2 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/README.md +5 -3
- package/docs/_media/CONTRIBUTING.md +18 -0
- package/docs/_media/LICENSE-MIT +22 -0
- package/docs/classes/AbortError.md +108 -129
- package/docs/classes/AlreadyExistsError.md +105 -126
- package/docs/classes/BaseError.md +112 -125
- package/docs/classes/CancelableAbility.md +136 -188
- package/docs/classes/ClientTools.md +1005 -1107
- package/docs/classes/CommonError.md +115 -136
- package/docs/classes/ConfigFile.md +150 -163
- package/docs/classes/EventClient.md +1128 -1282
- package/docs/classes/EventServer.md +1165 -1303
- package/docs/classes/EventToolFunc.md +958 -1028
- package/docs/classes/FStringPromptTemplate.md +352 -438
- package/docs/classes/FewShotPromptTemplate.md +364 -464
- package/docs/classes/GolangPromptTemplate.md +352 -438
- package/docs/classes/HFEnvironment.md +53 -79
- package/docs/classes/HFInterpreter.md +20 -377
- package/docs/classes/HFTemplate.md +21 -33
- package/docs/classes/HfPromptTemplate.md +352 -438
- package/docs/classes/IntSet.md +67 -100
- package/docs/classes/NotFoundError.md +105 -126
- package/docs/classes/NotImplementationError.md +105 -126
- package/docs/classes/PromptExampleSelector.md +58 -70
- package/docs/classes/PromptTemplate.md +338 -422
- package/docs/classes/ReadableStreamError.md +108 -129
- package/docs/classes/ResClientTools.md +916 -1026
- package/docs/classes/ResServerTools.md +919 -1026
- package/docs/classes/SSEChannel.md +93 -112
- package/docs/classes/Semaphore.md +44 -140
- package/docs/classes/ServerTools.md +981 -1072
- package/docs/classes/TaskAbortController.md +46 -66
- package/docs/classes/ToolFunc.md +840 -910
- package/docs/enumerations/AsyncFeatureBits.md +37 -0
- package/docs/enumerations/AsyncFeatures.md +37 -0
- package/docs/enumerations/ErrorCode.md +217 -0
- package/docs/enumerations/XXHashAlgorithm.md +27 -0
- package/docs/functions/AIArgProcessor.md +27 -0
- package/docs/functions/AIStream.md +50 -0
- package/docs/functions/ChoiceArgProcessor.md +27 -0
- package/docs/functions/RateLimit.md +33 -0
- package/docs/functions/TemplateArgProcessor.md +27 -0
- package/docs/functions/backendEventable.md +23 -0
- package/docs/functions/canonicalize.md +21 -0
- package/docs/functions/countRegexMatches.md +33 -0
- package/docs/functions/createAbilityInjector.md +87 -0
- package/docs/functions/createCallbacksTransformer.md +49 -0
- package/docs/functions/createEmptyReadableStream.md +23 -0
- package/docs/functions/createEndWithRepetitionDetector.md +29 -0
- package/docs/functions/createError.md +35 -0
- package/docs/functions/createEventStreamTransformer.md +33 -0
- package/docs/functions/createHfValueFunc.md +29 -0
- package/docs/functions/createLRUCache.md +23 -0
- package/docs/functions/dateToText.md +23 -0
- package/docs/functions/expandEnv.md +40 -0
- package/docs/functions/expandObjEnv.md +54 -0
- package/docs/functions/extNameLevel.md +43 -0
- package/docs/functions/fileIsExists.md +34 -0
- package/docs/functions/filenameReservedRegex.md +22 -0
- package/docs/functions/filterValidFnScope.md +21 -0
- package/docs/functions/findPort.md +23 -0
- package/docs/functions/formatISO.md +71 -0
- package/docs/functions/getAllEnumKeys.md +31 -0
- package/docs/functions/getConfigFileNames.md +23 -0
- package/docs/functions/getConfigs.md +23 -0
- package/docs/functions/getKeysPath.md +38 -0
- package/docs/functions/getMultiLevelExtname.md +31 -0
- package/docs/functions/getPackageDir.md +39 -0
- package/docs/functions/getRealFilepath.md +34 -0
- package/docs/functions/getResponseErrorReadableStream.md +21 -0
- package/docs/functions/hfParse.md +24 -0
- package/docs/functions/hfTokenize.md +25 -0
- package/docs/functions/interpolateEnv.md +25 -0
- package/docs/functions/interpolateFString.md +27 -0
- package/docs/functions/interpolateGolangTemplate.md +31 -0
- package/docs/functions/isModelNameMatched.md +45 -0
- package/docs/functions/isValidFilename.md +38 -0
- package/docs/functions/isValidFilepath.md +27 -0
- package/docs/functions/isWebStream.md +21 -0
- package/docs/functions/jsonFilterToWhere.md +45 -0
- package/docs/functions/jsonToMarkdownStr.md +31 -0
- package/docs/functions/loadFileFromPaths.md +54 -0
- package/docs/functions/loadTextFromPaths.md +29 -0
- package/docs/functions/lrucache.md +29 -0
- package/docs/functions/makeToolFuncCancelable.md +23 -0
- package/docs/functions/matchUrlProtocol.md +48 -0
- package/docs/functions/memoize.md +27 -0
- package/docs/functions/messagesToText.md +21 -0
- package/docs/functions/paramsSizeToScaleStr.md +32 -0
- package/docs/functions/parseCommand.md +33 -0
- package/docs/functions/parseDateFormat.md +360 -0
- package/docs/functions/parseFString.md +26 -0
- package/docs/functions/parseISO.md +72 -0
- package/docs/functions/parseJsJson.md +38 -0
- package/docs/functions/parseObjectArgInfo.md +27 -0
- package/docs/functions/parseObjectArgumentInfos.md +25 -0
- package/docs/functions/parseObjectArguments.md +68 -0
- package/docs/functions/parseObjectArgumentsAsArgInfos.md +42 -0
- package/docs/functions/parseYaml.md +21 -0
- package/docs/functions/quoteStr.md +21 -0
- package/docs/functions/reControlCharsRegex.md +21 -0
- package/docs/functions/readFilenamesRecursiveSync.md +47 -0
- package/docs/functions/readableFromAsyncIterable.md +28 -0
- package/docs/functions/registerCoreTools.md +17 -0
- package/docs/functions/registerYamlTag.md +21 -0
- package/docs/functions/sanitizeFilename.md +37 -0
- package/docs/functions/sanitizeFilepath.md +31 -0
- package/docs/functions/saveConfigFile.md +25 -0
- package/docs/functions/scaleStrToParamsSize.md +27 -0
- package/docs/functions/simplifyObjectArguments.md +21 -0
- package/docs/functions/sortedValues.md +25 -0
- package/docs/functions/splitSentence.md +37 -0
- package/docs/functions/stringifyYaml.md +49 -0
- package/docs/functions/textToDate.md +23 -0
- package/docs/functions/throwError.md +37 -0
- package/docs/functions/toDate.md +76 -0
- package/docs/functions/toDateTime.md +21 -0
- package/docs/functions/trimStartOfStreamHelper.md +41 -0
- package/docs/functions/truncTo.md +47 -0
- package/docs/functions/uuid.md +23 -0
- package/docs/functions/uuidParse.md +21 -0
- package/docs/functions/uuidStringify.md +23 -0
- package/docs/functions/uuidValidate.md +21 -0
- package/docs/functions/uuidVersion.md +21 -0
- package/docs/functions/uuidv1.md +47 -0
- package/docs/functions/uuidv4.md +47 -0
- package/docs/functions/uuidv5.md +51 -0
- package/docs/functions/wait.md +21 -0
- package/docs/functions/xxhash.md +25 -0
- package/docs/functions/xxhash32.md +23 -0
- package/docs/functions/xxhash64.md +23 -0
- package/docs/functions/xxhashAsStr.md +25 -0
- package/docs/globals.md +236 -0
- package/docs/interfaces/AIChatAssistantMessageParam.md +29 -38
- package/docs/interfaces/AIChatContentPartImage.md +11 -16
- package/docs/interfaces/AIChatContentPartText.md +9 -12
- package/docs/interfaces/AIChatMessageParamBase.md +12 -19
- package/docs/interfaces/AIChatMessageToolCall.md +18 -21
- package/docs/interfaces/AIChatSystemMessageParam.md +16 -22
- package/docs/interfaces/AIChatToolMessageParam.md +19 -26
- package/docs/interfaces/AIChatUserMessageParam.md +32 -42
- package/docs/interfaces/AIChoiceConfig.md +31 -39
- package/docs/interfaces/AIResult.md +29 -32
- package/docs/interfaces/AIStreamParser.md +24 -18
- package/docs/interfaces/AIStreamParserOptions.md +8 -10
- package/docs/interfaces/BaseFunc.md +55 -75
- package/docs/interfaces/BaseFuncItem.md +43 -61
- package/docs/interfaces/CancelableAbilityOptions.md +43 -54
- package/docs/interfaces/ClientFuncItem.md +66 -83
- package/docs/interfaces/DotenvExpandOptions.md +15 -19
- package/docs/interfaces/DotenvExpandOutput.md +11 -14
- package/docs/interfaces/DotenvParseInput.md +6 -2
- package/docs/interfaces/DotenvParseOutput.md +6 -2
- package/docs/interfaces/DotenvPopulateInput.md +6 -2
- package/docs/interfaces/EventClientFuncParams.md +22 -33
- package/docs/interfaces/EventServerFuncParams.md +27 -35
- package/docs/interfaces/FewShotPromptTemplateOptions.md +58 -74
- package/docs/interfaces/FuncItem.md +53 -70
- package/docs/interfaces/FuncParam.md +29 -36
- package/docs/interfaces/FuncParams.md +6 -2
- package/docs/interfaces/Funcs.md +6 -2
- package/docs/interfaces/JsonFilter.md +6 -2
- package/docs/interfaces/ParseObjectArgumentOptions.md +23 -29
- package/docs/interfaces/PromptExampleSelectorOptions.md +13 -16
- package/docs/interfaces/PromptTemplateOptions.md +31 -40
- package/docs/interfaces/RemoteFuncItem.md +64 -82
- package/docs/interfaces/ResClientFuncParams.md +14 -19
- package/docs/interfaces/ResServerFuncParams.md +28 -36
- package/docs/interfaces/SanitizeFilenameOptions.md +11 -14
- package/docs/interfaces/ServerFuncItem.md +70 -88
- package/docs/interfaces/ServerFuncParams.md +15 -20
- package/docs/interfaces/StreamCallbacksAndOptions.md +36 -65
- package/docs/interfaces/TaskAbortControllers.md +6 -2
- package/docs/interfaces/TaskPromise.md +48 -61
- package/docs/interfaces/ToolFuncPackage.md +18 -32
- package/docs/type-aliases/AIChatContentPart.md +13 -0
- package/docs/type-aliases/AIChatMessageParam.md +13 -0
- package/docs/type-aliases/AIChatRole.md +13 -0
- package/docs/type-aliases/AIMessageType.md +13 -0
- package/docs/type-aliases/AIModelNameRule.md +13 -0
- package/docs/type-aliases/AIModelNameRuleFn.md +21 -0
- package/docs/type-aliases/AIModelNameRules.md +13 -0
- package/docs/type-aliases/AITextGenerationFinishReason.md +13 -0
- package/docs/type-aliases/ActionName.md +13 -0
- package/docs/type-aliases/AsyncTaskId.md +13 -0
- package/docs/type-aliases/EventErrorListenerFn.md +27 -0
- package/docs/type-aliases/EventListenerFn.md +25 -0
- package/docs/type-aliases/FStringPromptTemplateNode.md +16 -0
- package/docs/type-aliases/FuncParamType.md +13 -0
- package/docs/type-aliases/PromptExamples.md +17 -0
- package/docs/type-aliases/PromptTemplateType.md +13 -0
- package/docs/type-aliases/PromptType.md +13 -0
- package/docs/type-aliases/TFunc.md +23 -0
- package/docs/variables/AIChatRoles.md +13 -0
- package/docs/variables/AIMessageTypes.md +13 -0
- package/docs/variables/AITextGenerationFinishReasons.md +13 -0
- package/docs/variables/AbortErrorCode.md +13 -0
- package/docs/variables/ActionNames.md +13 -0
- package/docs/variables/AlreadyExistsErrorCode.md +13 -0
- package/docs/variables/ClientToolFuncSchema.md +87 -0
- package/docs/variables/DefaultAsyncSemaphoreCapacity.md +13 -0
- package/docs/variables/EventBusName.md +13 -0
- package/docs/variables/EventName.md +13 -0
- package/docs/variables/FilenameReservedRegex.md +16 -0
- package/docs/variables/HFBuiltins.md +92 -0
- package/docs/variables/InternalErrorCode.md +13 -0
- package/docs/variables/NotFoundErrorCode.md +13 -0
- package/docs/variables/NotImplementedErrorCode.md +13 -0
- package/docs/variables/PASSING_SCORE.md +13 -0
- package/docs/variables/PromptTemplateTypes.md +13 -0
- package/docs/variables/PromptTypes.md +16 -0
- package/docs/variables/RStreamErrCode.md +13 -0
- package/docs/variables/RemoteToolFuncSchema.md +87 -0
- package/docs/variables/ResponseRStreamErrCode.md +13 -0
- package/docs/variables/SSEChannelAlreadyClosedErrCode.md +13 -0
- package/docs/variables/ServerToolFuncSchema.md +87 -0
- package/docs/variables/ToolAsyncCancelableBit.md +13 -0
- package/docs/variables/ToolAsyncMultiTaskBit.md +13 -0
- package/docs/variables/ToolAsyncPriorityBit.md +13 -0
- package/docs/variables/ToolFuncSchema.md +125 -0
- package/docs/variables/WindowsReservedNameRegex.md +15 -0
- package/docs/variables/base32768.md +13 -0
- package/docs/variables/defaultTemplateFormat.md +13 -0
- package/docs/variables/event.md +13 -0
- package/docs/variables/eventClient.md +13 -0
- package/docs/variables/eventServer.md +13 -0
- package/docs/variables/lrucache.md +13 -0
- package/docs/variables/mimeType.md +13 -0
- package/docs/variables/uuidNIL.md +13 -0
- package/package.json +26 -27
- package/dist/chunk-W2LO3HZT.mjs +0 -1
- package/docs/.nojekyll +0 -1
- package/docs/enums/AsyncFeatureBits.md +0 -41
- package/docs/enums/AsyncFeatures.md +0 -41
- package/docs/enums/ErrorCode.md +0 -239
- package/docs/enums/XXHashAlgorithm.md +0 -30
- package/docs/modules.md +0 -4062
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
[
|
|
1
|
+
[**@isdk/ai-tool**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CommonError
|
|
2
6
|
|
|
3
7
|
# Class: CommonError
|
|
4
8
|
|
|
5
9
|
BaseError class that extends the Error class.
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
## Example
|
|
8
12
|
|
|
9
13
|
```ts
|
|
10
14
|
// Create a custom error
|
|
@@ -19,71 +23,42 @@ class CustomError extends BaseError {
|
|
|
19
23
|
throw new CustomError('This is a custom error');
|
|
20
24
|
```
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
## Description
|
|
23
27
|
|
|
24
28
|
This class is used to create custom errors that extend the built-in Error class. It provides a way to define custom error codes and additional data associated with the error.
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
## Method
|
|
27
31
|
|
|
28
32
|
toJSON - Returns a JSON representation of the error.
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
## Method
|
|
31
35
|
|
|
32
36
|
fromJSON - Creates a new BaseError instance from a JSON representation.
|
|
33
37
|
|
|
34
|
-
##
|
|
38
|
+
## Extends
|
|
35
39
|
|
|
36
40
|
- [`BaseError`](BaseError.md)
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
↳↳ [`AbortError`](AbortError.md)
|
|
41
|
-
|
|
42
|
-
↳↳ [`AlreadyExistsError`](AlreadyExistsError.md)
|
|
43
|
-
|
|
44
|
-
↳↳ [`NotFoundError`](NotFoundError.md)
|
|
45
|
-
|
|
46
|
-
↳↳ [`NotImplementationError`](NotImplementationError.md)
|
|
47
|
-
|
|
48
|
-
## Table of contents
|
|
49
|
-
|
|
50
|
-
### Constructors
|
|
51
|
-
|
|
52
|
-
- [constructor](CommonError.md#constructor)
|
|
42
|
+
## Extended by
|
|
53
43
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- [
|
|
57
|
-
- [
|
|
58
|
-
- [code](CommonError.md#code)
|
|
59
|
-
- [data](CommonError.md#data)
|
|
60
|
-
- [message](CommonError.md#message)
|
|
61
|
-
- [name](CommonError.md#name)
|
|
62
|
-
- [stack](CommonError.md#stack)
|
|
63
|
-
- [code](CommonError.md#code-1)
|
|
64
|
-
- [prepareStackTrace](CommonError.md#preparestacktrace)
|
|
65
|
-
- [stackTraceLimit](CommonError.md#stacktracelimit)
|
|
66
|
-
|
|
67
|
-
### Methods
|
|
68
|
-
|
|
69
|
-
- [fromJSON](CommonError.md#fromjson)
|
|
70
|
-
- [toJSON](CommonError.md#tojson)
|
|
71
|
-
- [captureStackTrace](CommonError.md#capturestacktrace)
|
|
72
|
-
- [createErrorClass](CommonError.md#createerrorclass)
|
|
44
|
+
- [`AbortError`](AbortError.md)
|
|
45
|
+
- [`AlreadyExistsError`](AlreadyExistsError.md)
|
|
46
|
+
- [`NotFoundError`](NotFoundError.md)
|
|
47
|
+
- [`NotImplementationError`](NotImplementationError.md)
|
|
73
48
|
|
|
74
49
|
## Constructors
|
|
75
50
|
|
|
76
|
-
###
|
|
51
|
+
### new CommonError()
|
|
77
52
|
|
|
78
|
-
|
|
53
|
+
> **new CommonError**(`message`, `name`?, `status`?): [`CommonError`](CommonError.md)
|
|
79
54
|
|
|
80
55
|
#### Parameters
|
|
81
56
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
57
|
+
• **message**: `string`
|
|
58
|
+
|
|
59
|
+
• **name?**: `string` \| `Record`\<`string`, `any`\>
|
|
60
|
+
|
|
61
|
+
• **status?**: `ErrorCodeType`
|
|
87
62
|
|
|
88
63
|
#### Returns
|
|
89
64
|
|
|
@@ -91,192 +66,189 @@ fromJSON - Creates a new BaseError instance from a JSON representation.
|
|
|
91
66
|
|
|
92
67
|
#### Overrides
|
|
93
68
|
|
|
94
|
-
[BaseError](BaseError.md).[constructor](BaseError.md#
|
|
69
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructors)
|
|
95
70
|
|
|
96
71
|
#### Defined in
|
|
97
72
|
|
|
98
|
-
|
|
73
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:90
|
|
99
74
|
|
|
100
75
|
## Properties
|
|
101
76
|
|
|
102
77
|
### caller
|
|
103
78
|
|
|
104
|
-
|
|
79
|
+
> **caller**: `string`
|
|
105
80
|
|
|
106
81
|
The name of the function that threw the error.
|
|
107
82
|
|
|
108
83
|
#### Inherited from
|
|
109
84
|
|
|
110
|
-
[BaseError](BaseError.md).[caller](BaseError.md#caller)
|
|
85
|
+
[`BaseError`](BaseError.md).[`caller`](BaseError.md#caller)
|
|
111
86
|
|
|
112
87
|
#### Defined in
|
|
113
88
|
|
|
114
|
-
|
|
89
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:63
|
|
115
90
|
|
|
116
|
-
|
|
91
|
+
***
|
|
117
92
|
|
|
118
|
-
### cause
|
|
93
|
+
### cause?
|
|
119
94
|
|
|
120
|
-
|
|
95
|
+
> `optional` **cause**: `unknown`
|
|
121
96
|
|
|
122
97
|
#### Inherited from
|
|
123
98
|
|
|
124
|
-
[BaseError](BaseError.md).[cause](BaseError.md#cause)
|
|
99
|
+
[`BaseError`](BaseError.md).[`cause`](BaseError.md#cause)
|
|
125
100
|
|
|
126
101
|
#### Defined in
|
|
127
102
|
|
|
128
|
-
|
|
103
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es2022.error.d.ts:24
|
|
129
104
|
|
|
130
|
-
|
|
105
|
+
***
|
|
131
106
|
|
|
132
107
|
### code
|
|
133
108
|
|
|
134
|
-
|
|
109
|
+
> **code**: `ErrorCodeType`
|
|
110
|
+
|
|
111
|
+
the error code
|
|
135
112
|
|
|
136
113
|
#### Inherited from
|
|
137
114
|
|
|
138
|
-
[BaseError](BaseError.md).[code](BaseError.md#code)
|
|
115
|
+
[`BaseError`](BaseError.md).[`code`](BaseError.md#code)
|
|
139
116
|
|
|
140
117
|
#### Defined in
|
|
141
118
|
|
|
142
|
-
|
|
119
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:64
|
|
143
120
|
|
|
144
|
-
|
|
121
|
+
***
|
|
145
122
|
|
|
146
|
-
### data
|
|
123
|
+
### data?
|
|
147
124
|
|
|
148
|
-
|
|
125
|
+
> `optional` **data**: `any`
|
|
149
126
|
|
|
150
127
|
Additional data associated with the error.
|
|
151
128
|
|
|
152
129
|
#### Inherited from
|
|
153
130
|
|
|
154
|
-
[BaseError](BaseError.md).[data](BaseError.md#data)
|
|
131
|
+
[`BaseError`](BaseError.md).[`data`](BaseError.md#data)
|
|
155
132
|
|
|
156
133
|
#### Defined in
|
|
157
134
|
|
|
158
|
-
|
|
135
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:65
|
|
159
136
|
|
|
160
|
-
|
|
137
|
+
***
|
|
161
138
|
|
|
162
139
|
### message
|
|
163
140
|
|
|
164
|
-
|
|
141
|
+
> **message**: `string`
|
|
165
142
|
|
|
166
143
|
#### Inherited from
|
|
167
144
|
|
|
168
|
-
[BaseError](BaseError.md).[message](BaseError.md#message)
|
|
145
|
+
[`BaseError`](BaseError.md).[`message`](BaseError.md#message)
|
|
169
146
|
|
|
170
147
|
#### Defined in
|
|
171
148
|
|
|
172
|
-
|
|
149
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es5.d.ts:1077
|
|
173
150
|
|
|
174
|
-
|
|
151
|
+
***
|
|
175
152
|
|
|
176
153
|
### name
|
|
177
154
|
|
|
178
|
-
|
|
155
|
+
> **name**: `string`
|
|
179
156
|
|
|
180
157
|
#### Inherited from
|
|
181
158
|
|
|
182
|
-
[BaseError](BaseError.md).[name](BaseError.md#name)
|
|
159
|
+
[`BaseError`](BaseError.md).[`name`](BaseError.md#name)
|
|
183
160
|
|
|
184
161
|
#### Defined in
|
|
185
162
|
|
|
186
|
-
|
|
163
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es5.d.ts:1076
|
|
187
164
|
|
|
188
|
-
|
|
165
|
+
***
|
|
189
166
|
|
|
190
|
-
### stack
|
|
167
|
+
### stack?
|
|
191
168
|
|
|
192
|
-
|
|
169
|
+
> `optional` **stack**: `string`
|
|
193
170
|
|
|
194
171
|
#### Inherited from
|
|
195
172
|
|
|
196
|
-
[BaseError](BaseError.md).[stack](BaseError.md#stack)
|
|
173
|
+
[`BaseError`](BaseError.md).[`stack`](BaseError.md#stack)
|
|
197
174
|
|
|
198
175
|
#### Defined in
|
|
199
176
|
|
|
200
|
-
|
|
177
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
201
178
|
|
|
202
|
-
|
|
179
|
+
***
|
|
203
180
|
|
|
204
181
|
### code
|
|
205
182
|
|
|
206
|
-
|
|
183
|
+
> `static` **code**: `ErrorCodeType`
|
|
207
184
|
|
|
208
185
|
The error code associated with the error.
|
|
209
186
|
|
|
210
187
|
#### Inherited from
|
|
211
188
|
|
|
212
|
-
[BaseError](BaseError.md).[code](BaseError.md#code-1)
|
|
189
|
+
[`BaseError`](BaseError.md).[`code`](BaseError.md#code-1)
|
|
213
190
|
|
|
214
191
|
#### Defined in
|
|
215
192
|
|
|
216
|
-
|
|
193
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:62
|
|
217
194
|
|
|
218
|
-
|
|
195
|
+
***
|
|
219
196
|
|
|
220
|
-
### prepareStackTrace
|
|
197
|
+
### prepareStackTrace()?
|
|
221
198
|
|
|
222
|
-
|
|
199
|
+
> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`
|
|
223
200
|
|
|
224
201
|
Optional override for formatting stack traces
|
|
225
202
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
203
|
+
#### Parameters
|
|
229
204
|
|
|
230
|
-
|
|
205
|
+
• **err**: `Error`
|
|
231
206
|
|
|
232
|
-
|
|
207
|
+
• **stackTraces**: `CallSite`[]
|
|
233
208
|
|
|
234
|
-
|
|
209
|
+
#### Returns
|
|
235
210
|
|
|
236
|
-
|
|
237
|
-
| :------ | :------ |
|
|
238
|
-
| `err` | `Error` |
|
|
239
|
-
| `stackTraces` | `CallSite`[] |
|
|
211
|
+
`any`
|
|
240
212
|
|
|
241
|
-
|
|
213
|
+
#### See
|
|
242
214
|
|
|
243
|
-
|
|
215
|
+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
244
216
|
|
|
245
217
|
#### Inherited from
|
|
246
218
|
|
|
247
|
-
[BaseError](BaseError.md).[prepareStackTrace](BaseError.md#preparestacktrace)
|
|
219
|
+
[`BaseError`](BaseError.md).[`prepareStackTrace`](BaseError.md#preparestacktrace)
|
|
248
220
|
|
|
249
221
|
#### Defined in
|
|
250
222
|
|
|
251
|
-
|
|
223
|
+
node\_modules/.pnpm/@types+node@22.5.5/node\_modules/@types/node/globals.d.ts:143
|
|
252
224
|
|
|
253
|
-
|
|
225
|
+
***
|
|
254
226
|
|
|
255
227
|
### stackTraceLimit
|
|
256
228
|
|
|
257
|
-
|
|
229
|
+
> `static` **stackTraceLimit**: `number`
|
|
258
230
|
|
|
259
231
|
#### Inherited from
|
|
260
232
|
|
|
261
|
-
[BaseError](BaseError.md).[stackTraceLimit](BaseError.md#stacktracelimit)
|
|
233
|
+
[`BaseError`](BaseError.md).[`stackTraceLimit`](BaseError.md#stacktracelimit)
|
|
262
234
|
|
|
263
235
|
#### Defined in
|
|
264
236
|
|
|
265
|
-
|
|
237
|
+
node\_modules/.pnpm/@types+node@22.5.5/node\_modules/@types/node/globals.d.ts:145
|
|
266
238
|
|
|
267
239
|
## Methods
|
|
268
240
|
|
|
269
|
-
### fromJSON
|
|
241
|
+
### fromJSON()
|
|
270
242
|
|
|
271
|
-
|
|
243
|
+
> **fromJSON**(`json`): [`BaseError`](BaseError.md)
|
|
272
244
|
|
|
273
245
|
Creates a new BaseError instance from a JSON representation.
|
|
274
246
|
|
|
275
247
|
#### Parameters
|
|
276
248
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
249
|
+
• **json**: `any`
|
|
250
|
+
|
|
251
|
+
A JSON representation of the error.
|
|
280
252
|
|
|
281
253
|
#### Returns
|
|
282
254
|
|
|
@@ -286,17 +258,17 @@ A new BaseError instance.
|
|
|
286
258
|
|
|
287
259
|
#### Inherited from
|
|
288
260
|
|
|
289
|
-
[BaseError](BaseError.md).[fromJSON](BaseError.md#fromjson)
|
|
261
|
+
[`BaseError`](BaseError.md).[`fromJSON`](BaseError.md#fromjson)
|
|
290
262
|
|
|
291
263
|
#### Defined in
|
|
292
264
|
|
|
293
|
-
|
|
265
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:87
|
|
294
266
|
|
|
295
|
-
|
|
267
|
+
***
|
|
296
268
|
|
|
297
|
-
### toJSON
|
|
269
|
+
### toJSON()
|
|
298
270
|
|
|
299
|
-
|
|
271
|
+
> **toJSON**(): `any`
|
|
300
272
|
|
|
301
273
|
Returns a JSON representation of the error.
|
|
302
274
|
|
|
@@ -308,26 +280,25 @@ A JSON representation of the error.
|
|
|
308
280
|
|
|
309
281
|
#### Inherited from
|
|
310
282
|
|
|
311
|
-
[BaseError](BaseError.md).[toJSON](BaseError.md#tojson)
|
|
283
|
+
[`BaseError`](BaseError.md).[`toJSON`](BaseError.md#tojson)
|
|
312
284
|
|
|
313
285
|
#### Defined in
|
|
314
286
|
|
|
315
|
-
|
|
287
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:80
|
|
316
288
|
|
|
317
|
-
|
|
289
|
+
***
|
|
318
290
|
|
|
319
|
-
### captureStackTrace
|
|
291
|
+
### captureStackTrace()
|
|
320
292
|
|
|
321
|
-
|
|
293
|
+
> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void`
|
|
322
294
|
|
|
323
295
|
Create .stack property on a target object
|
|
324
296
|
|
|
325
297
|
#### Parameters
|
|
326
298
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
| `constructorOpt?` | `Function` |
|
|
299
|
+
• **targetObject**: `object`
|
|
300
|
+
|
|
301
|
+
• **constructorOpt?**: `Function`
|
|
331
302
|
|
|
332
303
|
#### Returns
|
|
333
304
|
|
|
@@ -335,34 +306,42 @@ Create .stack property on a target object
|
|
|
335
306
|
|
|
336
307
|
#### Inherited from
|
|
337
308
|
|
|
338
|
-
[BaseError](BaseError.md).[captureStackTrace](BaseError.md#capturestacktrace)
|
|
309
|
+
[`BaseError`](BaseError.md).[`captureStackTrace`](BaseError.md#capturestacktrace)
|
|
339
310
|
|
|
340
311
|
#### Defined in
|
|
341
312
|
|
|
342
|
-
|
|
313
|
+
node\_modules/.pnpm/@types+node@22.5.5/node\_modules/@types/node/globals.d.ts:136
|
|
343
314
|
|
|
344
|
-
|
|
315
|
+
***
|
|
345
316
|
|
|
346
|
-
### createErrorClass
|
|
317
|
+
### createErrorClass()
|
|
347
318
|
|
|
348
|
-
|
|
319
|
+
> `static` **createErrorClass**(`aType`, `aErrorCode`?, `ParentErrorClass`?): *typeof* [`BaseError`](BaseError.md)
|
|
320
|
+
|
|
321
|
+
Create an Error Class
|
|
349
322
|
|
|
350
323
|
#### Parameters
|
|
351
324
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
325
|
+
• **aType**: `string`
|
|
326
|
+
|
|
327
|
+
the error type(class) name
|
|
328
|
+
|
|
329
|
+
• **aErrorCode?**: `string` \| `number` \| *typeof* `AbstractError`
|
|
330
|
+
|
|
331
|
+
• **ParentErrorClass?**: *typeof* [`BaseError`](BaseError.md)
|
|
332
|
+
|
|
333
|
+
the parent error class. defaults to AbstractError
|
|
357
334
|
|
|
358
335
|
#### Returns
|
|
359
336
|
|
|
360
|
-
typeof [`BaseError`](BaseError.md)
|
|
337
|
+
*typeof* [`BaseError`](BaseError.md)
|
|
338
|
+
|
|
339
|
+
the new Error Class
|
|
361
340
|
|
|
362
341
|
#### Inherited from
|
|
363
342
|
|
|
364
|
-
[BaseError](BaseError.md).[createErrorClass](BaseError.md#createerrorclass)
|
|
343
|
+
[`BaseError`](BaseError.md).[`createErrorClass`](BaseError.md#createerrorclass)
|
|
365
344
|
|
|
366
345
|
#### Defined in
|
|
367
346
|
|
|
368
|
-
|
|
347
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:66
|