@isdk/ai-tool 0.2.0 → 0.2.1
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-TOUPOZHH.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 +3 -3
- package/dist/index.d.ts +3 -3
- 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 +26 -33
- 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) / BaseError
|
|
2
6
|
|
|
3
7
|
# Class: BaseError
|
|
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,69 +23,48 @@ 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
|
- `AbstractError`
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
↳↳ [`CommonError`](CommonError.md)
|
|
41
|
-
|
|
42
|
-
↳↳ [`ReadableStreamError`](ReadableStreamError.md)
|
|
42
|
+
## Extended by
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
- [`CommonError`](CommonError.md)
|
|
45
|
+
- [`ReadableStreamError`](ReadableStreamError.md)
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- [constructor](BaseError.md#constructor)
|
|
47
|
+
## Constructors
|
|
49
48
|
|
|
50
|
-
###
|
|
49
|
+
### new BaseError()
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
- [cause](BaseError.md#cause)
|
|
54
|
-
- [code](BaseError.md#code)
|
|
55
|
-
- [data](BaseError.md#data)
|
|
56
|
-
- [message](BaseError.md#message)
|
|
57
|
-
- [name](BaseError.md#name)
|
|
58
|
-
- [stack](BaseError.md#stack)
|
|
59
|
-
- [code](BaseError.md#code-1)
|
|
60
|
-
- [prepareStackTrace](BaseError.md#preparestacktrace)
|
|
61
|
-
- [stackTraceLimit](BaseError.md#stacktracelimit)
|
|
51
|
+
> **new BaseError**(`message`, `code`?, `name`?): [`BaseError`](BaseError.md)
|
|
62
52
|
|
|
63
|
-
|
|
53
|
+
Constructs a new BaseError instance.
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
- [toJSON](BaseError.md#tojson)
|
|
67
|
-
- [captureStackTrace](BaseError.md#capturestacktrace)
|
|
68
|
-
- [createErrorClass](BaseError.md#createerrorclass)
|
|
55
|
+
#### Parameters
|
|
69
56
|
|
|
70
|
-
|
|
57
|
+
• **message**: `string`
|
|
71
58
|
|
|
72
|
-
|
|
59
|
+
The error message.
|
|
73
60
|
|
|
74
|
-
• **
|
|
61
|
+
• **code?**: `ErrorCodeType`
|
|
75
62
|
|
|
76
|
-
|
|
63
|
+
The error code.
|
|
77
64
|
|
|
78
|
-
|
|
65
|
+
• **name?**: `string` \| `object`
|
|
79
66
|
|
|
80
|
-
|
|
81
|
-
| :------ | :------ | :------ |
|
|
82
|
-
| `message` | `string` | The error message. |
|
|
83
|
-
| `code?` | `ErrorCodeType` | The error code. |
|
|
84
|
-
| `name?` | `string` \| `object` | The error name or additional properties. |
|
|
67
|
+
The error name or additional properties.
|
|
85
68
|
|
|
86
69
|
#### Returns
|
|
87
70
|
|
|
@@ -89,180 +72,177 @@ Constructs a new BaseError instance.
|
|
|
89
72
|
|
|
90
73
|
#### Overrides
|
|
91
74
|
|
|
92
|
-
AbstractError.constructor
|
|
75
|
+
`AbstractError.constructor`
|
|
93
76
|
|
|
94
77
|
#### Defined in
|
|
95
78
|
|
|
96
|
-
|
|
79
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:74
|
|
97
80
|
|
|
98
81
|
## Properties
|
|
99
82
|
|
|
100
83
|
### caller
|
|
101
84
|
|
|
102
|
-
|
|
85
|
+
> **caller**: `string`
|
|
103
86
|
|
|
104
87
|
The name of the function that threw the error.
|
|
105
88
|
|
|
106
89
|
#### Defined in
|
|
107
90
|
|
|
108
|
-
|
|
91
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:63
|
|
109
92
|
|
|
110
|
-
|
|
93
|
+
***
|
|
111
94
|
|
|
112
|
-
### cause
|
|
95
|
+
### cause?
|
|
113
96
|
|
|
114
|
-
|
|
97
|
+
> `optional` **cause**: `unknown`
|
|
115
98
|
|
|
116
99
|
#### Inherited from
|
|
117
100
|
|
|
118
|
-
AbstractError.cause
|
|
101
|
+
`AbstractError.cause`
|
|
119
102
|
|
|
120
103
|
#### Defined in
|
|
121
104
|
|
|
122
|
-
|
|
105
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es2022.error.d.ts:24
|
|
123
106
|
|
|
124
|
-
|
|
107
|
+
***
|
|
125
108
|
|
|
126
109
|
### code
|
|
127
110
|
|
|
128
|
-
|
|
111
|
+
> **code**: `ErrorCodeType`
|
|
112
|
+
|
|
113
|
+
the error code
|
|
129
114
|
|
|
130
115
|
#### Overrides
|
|
131
116
|
|
|
132
|
-
AbstractError.code
|
|
117
|
+
`AbstractError.code`
|
|
133
118
|
|
|
134
119
|
#### Defined in
|
|
135
120
|
|
|
136
|
-
|
|
121
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:64
|
|
137
122
|
|
|
138
|
-
|
|
123
|
+
***
|
|
139
124
|
|
|
140
|
-
### data
|
|
125
|
+
### data?
|
|
141
126
|
|
|
142
|
-
|
|
127
|
+
> `optional` **data**: `any`
|
|
143
128
|
|
|
144
129
|
Additional data associated with the error.
|
|
145
130
|
|
|
146
131
|
#### Defined in
|
|
147
132
|
|
|
148
|
-
|
|
133
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:65
|
|
149
134
|
|
|
150
|
-
|
|
135
|
+
***
|
|
151
136
|
|
|
152
137
|
### message
|
|
153
138
|
|
|
154
|
-
|
|
139
|
+
> **message**: `string`
|
|
155
140
|
|
|
156
141
|
#### Inherited from
|
|
157
142
|
|
|
158
|
-
AbstractError.message
|
|
143
|
+
`AbstractError.message`
|
|
159
144
|
|
|
160
145
|
#### Defined in
|
|
161
146
|
|
|
162
|
-
|
|
147
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es5.d.ts:1077
|
|
163
148
|
|
|
164
|
-
|
|
149
|
+
***
|
|
165
150
|
|
|
166
151
|
### name
|
|
167
152
|
|
|
168
|
-
|
|
153
|
+
> **name**: `string`
|
|
169
154
|
|
|
170
155
|
#### Inherited from
|
|
171
156
|
|
|
172
|
-
AbstractError.name
|
|
157
|
+
`AbstractError.name`
|
|
173
158
|
|
|
174
159
|
#### Defined in
|
|
175
160
|
|
|
176
|
-
|
|
161
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es5.d.ts:1076
|
|
177
162
|
|
|
178
|
-
|
|
163
|
+
***
|
|
179
164
|
|
|
180
|
-
### stack
|
|
165
|
+
### stack?
|
|
181
166
|
|
|
182
|
-
|
|
167
|
+
> `optional` **stack**: `string`
|
|
183
168
|
|
|
184
169
|
#### Inherited from
|
|
185
170
|
|
|
186
|
-
AbstractError.stack
|
|
171
|
+
`AbstractError.stack`
|
|
187
172
|
|
|
188
173
|
#### Defined in
|
|
189
174
|
|
|
190
|
-
|
|
175
|
+
node\_modules/.pnpm/typescript@5.6.2/node\_modules/typescript/lib/lib.es5.d.ts:1078
|
|
191
176
|
|
|
192
|
-
|
|
177
|
+
***
|
|
193
178
|
|
|
194
179
|
### code
|
|
195
180
|
|
|
196
|
-
|
|
181
|
+
> `static` **code**: `ErrorCodeType`
|
|
197
182
|
|
|
198
183
|
The error code associated with the error.
|
|
199
184
|
|
|
200
185
|
#### Defined in
|
|
201
186
|
|
|
202
|
-
|
|
187
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:62
|
|
203
188
|
|
|
204
|
-
|
|
189
|
+
***
|
|
205
190
|
|
|
206
|
-
### prepareStackTrace
|
|
191
|
+
### prepareStackTrace()?
|
|
207
192
|
|
|
208
|
-
|
|
193
|
+
> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`
|
|
209
194
|
|
|
210
195
|
Optional override for formatting stack traces
|
|
211
196
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
197
|
+
#### Parameters
|
|
215
198
|
|
|
216
|
-
|
|
199
|
+
• **err**: `Error`
|
|
217
200
|
|
|
218
|
-
|
|
201
|
+
• **stackTraces**: `CallSite`[]
|
|
219
202
|
|
|
220
|
-
|
|
203
|
+
#### Returns
|
|
221
204
|
|
|
222
|
-
|
|
223
|
-
| :------ | :------ |
|
|
224
|
-
| `err` | `Error` |
|
|
225
|
-
| `stackTraces` | `CallSite`[] |
|
|
205
|
+
`any`
|
|
226
206
|
|
|
227
|
-
|
|
207
|
+
#### See
|
|
228
208
|
|
|
229
|
-
|
|
209
|
+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
230
210
|
|
|
231
211
|
#### Inherited from
|
|
232
212
|
|
|
233
|
-
AbstractError.prepareStackTrace
|
|
213
|
+
`AbstractError.prepareStackTrace`
|
|
234
214
|
|
|
235
215
|
#### Defined in
|
|
236
216
|
|
|
237
|
-
|
|
217
|
+
node\_modules/.pnpm/@types+node@22.5.5/node\_modules/@types/node/globals.d.ts:143
|
|
238
218
|
|
|
239
|
-
|
|
219
|
+
***
|
|
240
220
|
|
|
241
221
|
### stackTraceLimit
|
|
242
222
|
|
|
243
|
-
|
|
223
|
+
> `static` **stackTraceLimit**: `number`
|
|
244
224
|
|
|
245
225
|
#### Inherited from
|
|
246
226
|
|
|
247
|
-
AbstractError.stackTraceLimit
|
|
227
|
+
`AbstractError.stackTraceLimit`
|
|
248
228
|
|
|
249
229
|
#### Defined in
|
|
250
230
|
|
|
251
|
-
|
|
231
|
+
node\_modules/.pnpm/@types+node@22.5.5/node\_modules/@types/node/globals.d.ts:145
|
|
252
232
|
|
|
253
233
|
## Methods
|
|
254
234
|
|
|
255
|
-
### fromJSON
|
|
235
|
+
### fromJSON()
|
|
256
236
|
|
|
257
|
-
|
|
237
|
+
> **fromJSON**(`json`): [`BaseError`](BaseError.md)
|
|
258
238
|
|
|
259
239
|
Creates a new BaseError instance from a JSON representation.
|
|
260
240
|
|
|
261
241
|
#### Parameters
|
|
262
242
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
243
|
+
• **json**: `any`
|
|
244
|
+
|
|
245
|
+
A JSON representation of the error.
|
|
266
246
|
|
|
267
247
|
#### Returns
|
|
268
248
|
|
|
@@ -272,13 +252,13 @@ A new BaseError instance.
|
|
|
272
252
|
|
|
273
253
|
#### Defined in
|
|
274
254
|
|
|
275
|
-
|
|
255
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:87
|
|
276
256
|
|
|
277
|
-
|
|
257
|
+
***
|
|
278
258
|
|
|
279
|
-
### toJSON
|
|
259
|
+
### toJSON()
|
|
280
260
|
|
|
281
|
-
|
|
261
|
+
> **toJSON**(): `any`
|
|
282
262
|
|
|
283
263
|
Returns a JSON representation of the error.
|
|
284
264
|
|
|
@@ -290,22 +270,21 @@ A JSON representation of the error.
|
|
|
290
270
|
|
|
291
271
|
#### Defined in
|
|
292
272
|
|
|
293
|
-
|
|
273
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:80
|
|
294
274
|
|
|
295
|
-
|
|
275
|
+
***
|
|
296
276
|
|
|
297
|
-
### captureStackTrace
|
|
277
|
+
### captureStackTrace()
|
|
298
278
|
|
|
299
|
-
|
|
279
|
+
> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void`
|
|
300
280
|
|
|
301
281
|
Create .stack property on a target object
|
|
302
282
|
|
|
303
283
|
#### Parameters
|
|
304
284
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
| `constructorOpt?` | `Function` |
|
|
285
|
+
• **targetObject**: `object`
|
|
286
|
+
|
|
287
|
+
• **constructorOpt?**: `Function`
|
|
309
288
|
|
|
310
289
|
#### Returns
|
|
311
290
|
|
|
@@ -313,34 +292,42 @@ Create .stack property on a target object
|
|
|
313
292
|
|
|
314
293
|
#### Inherited from
|
|
315
294
|
|
|
316
|
-
AbstractError.captureStackTrace
|
|
295
|
+
`AbstractError.captureStackTrace`
|
|
317
296
|
|
|
318
297
|
#### Defined in
|
|
319
298
|
|
|
320
|
-
|
|
299
|
+
node\_modules/.pnpm/@types+node@22.5.5/node\_modules/@types/node/globals.d.ts:136
|
|
300
|
+
|
|
301
|
+
***
|
|
321
302
|
|
|
322
|
-
|
|
303
|
+
### createErrorClass()
|
|
323
304
|
|
|
324
|
-
|
|
305
|
+
> `static` **createErrorClass**(`aType`, `aErrorCode`?, `ParentErrorClass`?): *typeof* [`BaseError`](BaseError.md)
|
|
325
306
|
|
|
326
|
-
|
|
307
|
+
Create an Error Class
|
|
327
308
|
|
|
328
309
|
#### Parameters
|
|
329
310
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
311
|
+
• **aType**: `string`
|
|
312
|
+
|
|
313
|
+
the error type(class) name
|
|
314
|
+
|
|
315
|
+
• **aErrorCode?**: `string` \| `number` \| *typeof* `AbstractError`
|
|
316
|
+
|
|
317
|
+
• **ParentErrorClass?**: *typeof* [`BaseError`](BaseError.md)
|
|
318
|
+
|
|
319
|
+
the parent error class. defaults to AbstractError
|
|
335
320
|
|
|
336
321
|
#### Returns
|
|
337
322
|
|
|
338
|
-
typeof [`BaseError`](BaseError.md)
|
|
323
|
+
*typeof* [`BaseError`](BaseError.md)
|
|
324
|
+
|
|
325
|
+
the new Error Class
|
|
339
326
|
|
|
340
327
|
#### Overrides
|
|
341
328
|
|
|
342
|
-
AbstractError.createErrorClass
|
|
329
|
+
`AbstractError.createErrorClass`
|
|
343
330
|
|
|
344
331
|
#### Defined in
|
|
345
332
|
|
|
346
|
-
|
|
333
|
+
node\_modules/.pnpm/@isdk+common-error@0.1.1/node\_modules/@isdk/common-error/dist/index.d.ts:66
|