@isdk/ai-tool 0.3.0 → 0.5.0

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.
Files changed (296) hide show
  1. package/dist/chunk-VIG2GB47.mjs +39 -1
  2. package/dist/chunk-VJ45JQBR.mjs +7829 -0
  3. package/dist/funcs.d.mts +3 -2
  4. package/dist/funcs.d.ts +3 -2
  5. package/dist/funcs.js +5156 -1
  6. package/dist/funcs.mjs +29 -1
  7. package/dist/index-Br-4ZYgE.d.mts +892 -0
  8. package/dist/index-Br-4ZYgE.d.ts +892 -0
  9. package/dist/index.d.mts +206 -238
  10. package/dist/index.d.ts +206 -238
  11. package/dist/index.js +8132 -1
  12. package/dist/index.mjs +476 -1
  13. package/dist/test/util.js +101 -1
  14. package/dist/test/util.mjs +30 -1
  15. package/package.json +31 -31
  16. package/dist/chunk-JHHFTTVE.mjs +0 -1
  17. package/dist/index-BC3GQn6-.d.mts +0 -488
  18. package/dist/index-BC3GQn6-.d.ts +0 -488
  19. package/docs/README.md +0 -250
  20. package/docs/_media/CONTRIBUTING.md +0 -18
  21. package/docs/_media/LICENSE-MIT +0 -22
  22. package/docs/classes/AbortError.md +0 -368
  23. package/docs/classes/AlreadyExistsError.md +0 -348
  24. package/docs/classes/BaseError.md +0 -359
  25. package/docs/classes/CancelableAbility.md +0 -379
  26. package/docs/classes/ClientTools.md +0 -2691
  27. package/docs/classes/CommonError.md +0 -377
  28. package/docs/classes/ConfigFile.md +0 -333
  29. package/docs/classes/EventClient.md +0 -3119
  30. package/docs/classes/EventServer.md +0 -3149
  31. package/docs/classes/EventToolFunc.md +0 -2533
  32. package/docs/classes/FStringPromptTemplate.md +0 -1150
  33. package/docs/classes/FewShotPromptTemplate.md +0 -1186
  34. package/docs/classes/GolangPromptTemplate.md +0 -1150
  35. package/docs/classes/HFEnvironment.md +0 -186
  36. package/docs/classes/HFInterpreter.md +0 -75
  37. package/docs/classes/HFTemplate.md +0 -67
  38. package/docs/classes/HfPromptTemplate.md +0 -1150
  39. package/docs/classes/IntSet.md +0 -216
  40. package/docs/classes/NotFoundError.md +0 -348
  41. package/docs/classes/NotImplementationError.md +0 -348
  42. package/docs/classes/PromptExampleSelector.md +0 -195
  43. package/docs/classes/PromptTemplate.md +0 -1079
  44. package/docs/classes/ReadableStreamError.md +0 -368
  45. package/docs/classes/ResClientTools.md +0 -2399
  46. package/docs/classes/ResServerTools.md +0 -2385
  47. package/docs/classes/SSEChannel.md +0 -270
  48. package/docs/classes/Semaphore.md +0 -177
  49. package/docs/classes/ServerTools.md +0 -2609
  50. package/docs/classes/TaskAbortController.md +0 -137
  51. package/docs/classes/ToolFunc.md +0 -2147
  52. package/docs/classes/YamlTypeBaseObject.md +0 -29
  53. package/docs/enumerations/AsyncFeatureBits.md +0 -37
  54. package/docs/enumerations/AsyncFeatures.md +0 -37
  55. package/docs/enumerations/ErrorCode.md +0 -217
  56. package/docs/enumerations/HashAlgorithm.md +0 -117
  57. package/docs/functions/AIArgProcessor.md +0 -27
  58. package/docs/functions/AIStream.md +0 -50
  59. package/docs/functions/ChoiceArgProcessor.md +0 -27
  60. package/docs/functions/RateLimit.md +0 -33
  61. package/docs/functions/TemplateArgProcessor.md +0 -27
  62. package/docs/functions/backendEventable.md +0 -23
  63. package/docs/functions/canonicalize.md +0 -21
  64. package/docs/functions/completeSentences.md +0 -23
  65. package/docs/functions/concatText.md +0 -23
  66. package/docs/functions/countLLMTokens.md +0 -23
  67. package/docs/functions/countRegexMatches.md +0 -33
  68. package/docs/functions/createAbilityInjector.md +0 -87
  69. package/docs/functions/createCallbacksTransformer.md +0 -49
  70. package/docs/functions/createEmptyReadableStream.md +0 -23
  71. package/docs/functions/createEndWithRepetitionDetector.md +0 -29
  72. package/docs/functions/createError.md +0 -35
  73. package/docs/functions/createEventStreamTransformer.md +0 -33
  74. package/docs/functions/createHfValueFunc.md +0 -29
  75. package/docs/functions/createLRUCache.md +0 -23
  76. package/docs/functions/createYamlObjectTag.md +0 -23
  77. package/docs/functions/dateToText.md +0 -23
  78. package/docs/functions/decodeCharset.md +0 -23
  79. package/docs/functions/detectCharset.md +0 -23
  80. package/docs/functions/encodeLLMTokens.md +0 -23
  81. package/docs/functions/expandEnv.md +0 -40
  82. package/docs/functions/expandObjEnv.md +0 -54
  83. package/docs/functions/extNameLevel.md +0 -43
  84. package/docs/functions/fileIsExists.md +0 -34
  85. package/docs/functions/filenameReservedRegex.md +0 -22
  86. package/docs/functions/filterValidFnScope.md +0 -21
  87. package/docs/functions/findIndexNonEmptyFrom.md +0 -23
  88. package/docs/functions/findPort.md +0 -23
  89. package/docs/functions/formatISO.md +0 -71
  90. package/docs/functions/formatTextWithSpace.md +0 -59
  91. package/docs/functions/getAllEnumKeys.md +0 -31
  92. package/docs/functions/getConfigFileNames.md +0 -23
  93. package/docs/functions/getConfigs.md +0 -23
  94. package/docs/functions/getFileMetaInfo.md +0 -21
  95. package/docs/functions/getHashAlgoBySize.md +0 -21
  96. package/docs/functions/getKeysPath.md +0 -38
  97. package/docs/functions/getLLMTokenizer.md +0 -21
  98. package/docs/functions/getMultiLevelExtname.md +0 -31
  99. package/docs/functions/getPackageDir.md +0 -39
  100. package/docs/functions/getRealFilepath.md +0 -34
  101. package/docs/functions/getResponseErrorReadableStream.md +0 -21
  102. package/docs/functions/hasDirectoryIn.md +0 -38
  103. package/docs/functions/hashFile.md +0 -23
  104. package/docs/functions/hashStream.md +0 -23
  105. package/docs/functions/hfParse.md +0 -24
  106. package/docs/functions/hfTokenize.md +0 -25
  107. package/docs/functions/interpolateEnv.md +0 -25
  108. package/docs/functions/interpolateFString.md +0 -27
  109. package/docs/functions/interpolateGolangTemplate.md +0 -31
  110. package/docs/functions/isLangUsingSpaces.md +0 -21
  111. package/docs/functions/isListItemString.md +0 -21
  112. package/docs/functions/isModelNameMatched.md +0 -45
  113. package/docs/functions/isPunctuationChar.md +0 -36
  114. package/docs/functions/isRegExp.md +0 -21
  115. package/docs/functions/isSectionString.md +0 -23
  116. package/docs/functions/isSentenceEnding.md +0 -21
  117. package/docs/functions/isSepLineString.md +0 -21
  118. package/docs/functions/isSubdirectory.md +0 -39
  119. package/docs/functions/isTitleString.md +0 -23
  120. package/docs/functions/isValidFilename.md +0 -38
  121. package/docs/functions/isValidFilepath.md +0 -27
  122. package/docs/functions/isWebStream.md +0 -21
  123. package/docs/functions/jsonFilterToWhere.md +0 -45
  124. package/docs/functions/jsonToMarkdownStr.md +0 -31
  125. package/docs/functions/loadFileFromPaths.md +0 -54
  126. package/docs/functions/loadTextFromPaths.md +0 -29
  127. package/docs/functions/lrucache.md +0 -29
  128. package/docs/functions/makeToolFuncCancelable.md +0 -23
  129. package/docs/functions/matchUrlProtocol.md +0 -48
  130. package/docs/functions/memoize.md +0 -27
  131. package/docs/functions/messagesToText.md +0 -21
  132. package/docs/functions/paramsSizeToScaleStr.md +0 -32
  133. package/docs/functions/parseCommand.md +0 -33
  134. package/docs/functions/parseDateFormat.md +0 -360
  135. package/docs/functions/parseFString.md +0 -26
  136. package/docs/functions/parseISO.md +0 -72
  137. package/docs/functions/parseJsJson.md +0 -38
  138. package/docs/functions/parseJsJsonSimpleSync.md +0 -23
  139. package/docs/functions/parseObjectArgInfo.md +0 -27
  140. package/docs/functions/parseObjectArgumentInfos.md +0 -25
  141. package/docs/functions/parseObjectArguments.md +0 -68
  142. package/docs/functions/parseObjectArgumentsAsArgInfos.md +0 -42
  143. package/docs/functions/parseYaml.md +0 -21
  144. package/docs/functions/quoteStr.md +0 -21
  145. package/docs/functions/reControlCharsRegex.md +0 -21
  146. package/docs/functions/readFilenamesRecursiveSync.md +0 -47
  147. package/docs/functions/readTextFileChunks.md +0 -51
  148. package/docs/functions/readTextFileChunksEx.md +0 -23
  149. package/docs/functions/readableFromAsyncIterable.md +0 -28
  150. package/docs/functions/registerCoreTools.md +0 -17
  151. package/docs/functions/registerYamlTag.md +0 -21
  152. package/docs/functions/removeMarkdownBold.md +0 -23
  153. package/docs/functions/removeMarkdownBoldAndItalic.md +0 -23
  154. package/docs/functions/removeMarkdownItalic.md +0 -23
  155. package/docs/functions/replaceWithPlaceholder.md +0 -41
  156. package/docs/functions/restoreFromPlacehoders.md +0 -45
  157. package/docs/functions/sanitizeFilename.md +0 -37
  158. package/docs/functions/sanitizeFilepath.md +0 -31
  159. package/docs/functions/saveConfigFile.md +0 -25
  160. package/docs/functions/scaleStrToParamsSize.md +0 -27
  161. package/docs/functions/simplifyObjectArguments.md +0 -21
  162. package/docs/functions/sortedValues.md +0 -25
  163. package/docs/functions/splitChunks.md +0 -23
  164. package/docs/functions/splitParagraph.md +0 -32
  165. package/docs/functions/splitSentence.md +0 -37
  166. package/docs/functions/stringifyYaml.md +0 -21
  167. package/docs/functions/stripConsoleColor.md +0 -21
  168. package/docs/functions/textToDate.md +0 -23
  169. package/docs/functions/throwError.md +0 -37
  170. package/docs/functions/toDate.md +0 -76
  171. package/docs/functions/toDateTime.md +0 -21
  172. package/docs/functions/toRegExp.md +0 -34
  173. package/docs/functions/trimStartOfStreamHelper.md +0 -41
  174. package/docs/functions/truncTo.md +0 -47
  175. package/docs/functions/truncateByToken.md +0 -23
  176. package/docs/functions/truncateToTokenLimit.md +0 -44
  177. package/docs/functions/truncateToTokenLimitEx.md +0 -23
  178. package/docs/functions/uuid.md +0 -23
  179. package/docs/functions/uuidParse.md +0 -21
  180. package/docs/functions/uuidStringify.md +0 -23
  181. package/docs/functions/uuidValidate.md +0 -21
  182. package/docs/functions/uuidVersion.md +0 -21
  183. package/docs/functions/uuidv1.md +0 -47
  184. package/docs/functions/uuidv4.md +0 -47
  185. package/docs/functions/uuidv5.md +0 -51
  186. package/docs/functions/wait.md +0 -21
  187. package/docs/functions/xxhash.md +0 -25
  188. package/docs/functions/xxhash32.md +0 -23
  189. package/docs/functions/xxhash64.md +0 -23
  190. package/docs/functions/xxhashAsStr.md +0 -25
  191. package/docs/globals.md +0 -285
  192. package/docs/interfaces/AIChatAssistantMessageParam.md +0 -117
  193. package/docs/interfaces/AIChatContentPartImage.md +0 -31
  194. package/docs/interfaces/AIChatContentPartText.md +0 -27
  195. package/docs/interfaces/AIChatMessageParamBase.md +0 -58
  196. package/docs/interfaces/AIChatMessageToolCall.md +0 -45
  197. package/docs/interfaces/AIChatSystemMessageParam.md +0 -87
  198. package/docs/interfaces/AIChatToolMessageParam.md +0 -97
  199. package/docs/interfaces/AIChatUserMessageParam.md +0 -127
  200. package/docs/interfaces/AIChoiceConfig.md +0 -77
  201. package/docs/interfaces/AIResult.md +0 -73
  202. package/docs/interfaces/AIStreamParser.md +0 -39
  203. package/docs/interfaces/AIStreamParserOptions.md +0 -21
  204. package/docs/interfaces/BaseFunc.md +0 -155
  205. package/docs/interfaces/BaseFuncItem.md +0 -103
  206. package/docs/interfaces/CancelableAbilityOptions.md +0 -115
  207. package/docs/interfaces/ClientFuncItem.md +0 -179
  208. package/docs/interfaces/DotenvExpandOptions.md +0 -47
  209. package/docs/interfaces/DotenvExpandOutput.md +0 -27
  210. package/docs/interfaces/DotenvParseInput.md +0 -11
  211. package/docs/interfaces/DotenvParseOutput.md +0 -11
  212. package/docs/interfaces/DotenvPopulateInput.md +0 -11
  213. package/docs/interfaces/EventClientFuncParams.md +0 -55
  214. package/docs/interfaces/EventServerFuncParams.md +0 -71
  215. package/docs/interfaces/FewShotPromptTemplateOptions.md +0 -163
  216. package/docs/interfaces/FuncItem.md +0 -143
  217. package/docs/interfaces/FuncParam.md +0 -71
  218. package/docs/interfaces/FuncParams.md +0 -11
  219. package/docs/interfaces/Funcs.md +0 -11
  220. package/docs/interfaces/HashAlgoParams.md +0 -37
  221. package/docs/interfaces/IFileMetaInfo.md +0 -77
  222. package/docs/interfaces/IReadTextFileChunksOptions.md +0 -157
  223. package/docs/interfaces/ITruncateToTokenLimitOptions.md +0 -111
  224. package/docs/interfaces/JsonFilter.md +0 -11
  225. package/docs/interfaces/ParseObjectArgumentOptions.md +0 -97
  226. package/docs/interfaces/PromptExampleSelectorOptions.md +0 -36
  227. package/docs/interfaces/PromptTemplateOptions.md +0 -75
  228. package/docs/interfaces/RemoteFuncItem.md +0 -168
  229. package/docs/interfaces/ReplacePlacehoderOptions.md +0 -47
  230. package/docs/interfaces/ResClientFuncParams.md +0 -35
  231. package/docs/interfaces/ResServerFuncParams.md +0 -73
  232. package/docs/interfaces/SanitizeFilenameOptions.md +0 -27
  233. package/docs/interfaces/SectionStringOptions.md +0 -27
  234. package/docs/interfaces/ServerFuncItem.md +0 -189
  235. package/docs/interfaces/ServerFuncParams.md +0 -37
  236. package/docs/interfaces/SplitSentenceOptions.md +0 -47
  237. package/docs/interfaces/StreamCallbacksAndOptions.md +0 -95
  238. package/docs/interfaces/TaskAbortControllers.md +0 -11
  239. package/docs/interfaces/TaskPromise.md +0 -138
  240. package/docs/interfaces/ToolFuncPackage.md +0 -49
  241. package/docs/type-aliases/AIChatContentPart.md +0 -13
  242. package/docs/type-aliases/AIChatMessageParam.md +0 -13
  243. package/docs/type-aliases/AIChatRole.md +0 -13
  244. package/docs/type-aliases/AIMessageType.md +0 -13
  245. package/docs/type-aliases/AIModelNameRule.md +0 -13
  246. package/docs/type-aliases/AIModelNameRuleFn.md +0 -21
  247. package/docs/type-aliases/AIModelNameRules.md +0 -13
  248. package/docs/type-aliases/AITextGenerationFinishReason.md +0 -13
  249. package/docs/type-aliases/ActionName.md +0 -13
  250. package/docs/type-aliases/AsyncTaskId.md +0 -13
  251. package/docs/type-aliases/EventErrorListenerFn.md +0 -27
  252. package/docs/type-aliases/EventListenerFn.md +0 -25
  253. package/docs/type-aliases/FStringPromptTemplateNode.md +0 -16
  254. package/docs/type-aliases/FuncParamType.md +0 -13
  255. package/docs/type-aliases/PromptExamples.md +0 -17
  256. package/docs/type-aliases/PromptTemplateType.md +0 -13
  257. package/docs/type-aliases/PromptType.md +0 -13
  258. package/docs/type-aliases/TFunc.md +0 -23
  259. package/docs/variables/AIChatRoles.md +0 -13
  260. package/docs/variables/AIMessageTypes.md +0 -13
  261. package/docs/variables/AITextGenerationFinishReasons.md +0 -13
  262. package/docs/variables/AbortErrorCode.md +0 -13
  263. package/docs/variables/ActionNames.md +0 -13
  264. package/docs/variables/AlreadyExistsErrorCode.md +0 -13
  265. package/docs/variables/ClientToolFuncSchema.md +0 -87
  266. package/docs/variables/DefaultAsyncSemaphoreCapacity.md +0 -13
  267. package/docs/variables/EventBusName.md +0 -13
  268. package/docs/variables/EventName.md +0 -13
  269. package/docs/variables/FilenameReservedRegex.md +0 -16
  270. package/docs/variables/HFBuiltins.md +0 -92
  271. package/docs/variables/InternalErrorCode.md +0 -13
  272. package/docs/variables/LLM_TOKENIZER_NAMES.md +0 -83
  273. package/docs/variables/LLM_TOKENIZER_NAMES_MAP.md +0 -13
  274. package/docs/variables/NotFoundErrorCode.md +0 -13
  275. package/docs/variables/NotImplementedErrorCode.md +0 -13
  276. package/docs/variables/PASSING_SCORE.md +0 -13
  277. package/docs/variables/PromptTemplateTypes.md +0 -13
  278. package/docs/variables/PromptTypes.md +0 -16
  279. package/docs/variables/RStreamErrCode.md +0 -13
  280. package/docs/variables/RemoteToolFuncSchema.md +0 -87
  281. package/docs/variables/ResponseRStreamErrCode.md +0 -13
  282. package/docs/variables/SSEChannelAlreadyClosedErrCode.md +0 -13
  283. package/docs/variables/ServerToolFuncSchema.md +0 -87
  284. package/docs/variables/ToolAsyncCancelableBit.md +0 -13
  285. package/docs/variables/ToolAsyncMultiTaskBit.md +0 -13
  286. package/docs/variables/ToolAsyncPriorityBit.md +0 -13
  287. package/docs/variables/ToolFuncSchema.md +0 -125
  288. package/docs/variables/WindowsReservedNameRegex.md +0 -15
  289. package/docs/variables/base32768.md +0 -13
  290. package/docs/variables/defaultTemplateFormat.md +0 -13
  291. package/docs/variables/event.md +0 -13
  292. package/docs/variables/eventClient.md +0 -13
  293. package/docs/variables/eventServer.md +0 -13
  294. package/docs/variables/lrucache.md +0 -13
  295. package/docs/variables/mimeType.md +0 -13
  296. package/docs/variables/uuidNIL.md +0 -13
@@ -1,1079 +0,0 @@
1
- [**@isdk/ai-tool**](../README.md) • **Docs**
2
-
3
- ***
4
-
5
- [@isdk/ai-tool](../globals.md) / PromptTemplate
6
-
7
- # Class: PromptTemplate
8
-
9
- ## Extends
10
-
11
- - `BaseFactory`
12
-
13
- ## Extended by
14
-
15
- - [`HfPromptTemplate`](HfPromptTemplate.md)
16
- - [`FStringPromptTemplate`](FStringPromptTemplate.md)
17
- - [`GolangPromptTemplate`](GolangPromptTemplate.md)
18
- - [`FewShotPromptTemplate`](FewShotPromptTemplate.md)
19
-
20
- ## Constructors
21
-
22
- ### new PromptTemplate()
23
-
24
- > **new PromptTemplate**(`template`?, `options`?): [`PromptTemplate`](PromptTemplate.md)
25
-
26
- #### Parameters
27
-
28
- • **template?**: `string` \| [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
29
-
30
- • **options?**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
31
-
32
- #### Returns
33
-
34
- [`PromptTemplate`](PromptTemplate.md)
35
-
36
- #### Overrides
37
-
38
- `BaseFactory.constructor`
39
-
40
- #### Defined in
41
-
42
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:69](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L69)
43
-
44
- ## Properties
45
-
46
- ### compiledTemplate
47
-
48
- > **compiledTemplate**: `any`
49
-
50
- #### Defined in
51
-
52
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:21](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L21)
53
-
54
- ***
55
-
56
- ### data
57
-
58
- > **data**: `undefined` \| `Record`\<`string`, `any`\>
59
-
60
- #### Defined in
61
-
62
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:24](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L24)
63
-
64
- ***
65
-
66
- ### inputVariables
67
-
68
- > **inputVariables**: `undefined` \| `string`[]
69
-
70
- #### Defined in
71
-
72
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:25](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L25)
73
-
74
- ***
75
-
76
- ### template
77
-
78
- > **template**: `string`
79
-
80
- #### Defined in
81
-
82
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:22](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L22)
83
-
84
- ***
85
-
86
- ### templateFormat
87
-
88
- > **templateFormat**: `undefined` \| `string`
89
-
90
- #### Defined in
91
-
92
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:23](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L23)
93
-
94
- ***
95
-
96
- ### \_aliases
97
-
98
- > `abstract` `static` **\_aliases**: [`string`]
99
-
100
- **`Internal`**
101
-
102
- the registered alias items object.
103
- the key is alias name, the value is the registered name
104
-
105
- #### Inherited from
106
-
107
- `BaseFactory._aliases`
108
-
109
- #### Defined in
110
-
111
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:59
112
-
113
- ***
114
-
115
- ### \_baseNameOnly
116
-
117
- > `static` **\_baseNameOnly**: `number`
118
-
119
- **`Internal`**
120
-
121
- Extracts a specified number of words from a PascalCase class name to use as a base name for registration,
122
- only if no `name` is specified. The parameter value indicates the maximum depth of the word extraction.
123
-
124
- In JavaScript, class names use `PascalCase` convention where each word starts with a capital letter.
125
- The baseNameOnly parameter is a number that specifies which words to extract from the class name as the base name.
126
- If the value is 1, it extracts the first word, 2 extracts the first two words, and 0 uses the entire class name.
127
- The base name is used to register the class to the factory.
128
-
129
- #### Example
130
-
131
- ```ts
132
- such as "JsonTextCodec" if baseNameOnly is 1, the first word "Json" will be extracted from "JsonTextCodec" as
133
- the base name. If baseNameOnly is 2, the first two words "JsonText" will be extracted as the base name. If
134
- baseNameOnly is 0, the entire class name "JsonTextCodec" will be used as the base name.
135
- ```
136
-
137
- #### Name
138
-
139
- _baseNameOnly
140
-
141
- #### Default
142
-
143
- ```ts
144
- 1
145
- @internal
146
- ```
147
-
148
- #### Inherited from
149
-
150
- `BaseFactory._baseNameOnly`
151
-
152
- #### Defined in
153
-
154
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:82
155
-
156
- ***
157
-
158
- ### \_children
159
-
160
- > `abstract` `static` **\_children**: `object`
161
-
162
- **`Internal`**
163
-
164
- The registered classes in the Factory
165
-
166
- #### Index Signature
167
-
168
- \[`name`: `string`\]: `any`
169
-
170
- #### Name
171
-
172
- _children
173
-
174
- #### Inherited from
175
-
176
- `BaseFactory._children`
177
-
178
- #### Defined in
179
-
180
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:49
181
-
182
- ***
183
-
184
- ### \_Factory
185
-
186
- > `abstract` `static` **\_Factory**: *typeof* `BaseFactory`
187
-
188
- **`Internal`**
189
-
190
- The Root Factory class
191
-
192
- #### Name
193
-
194
- _Factory
195
-
196
- #### Inherited from
197
-
198
- `BaseFactory._Factory`
199
-
200
- #### Defined in
201
-
202
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:41
203
-
204
- ## Accessors
205
-
206
- ### aliases
207
-
208
- > `get` `static` **aliases**(): `string`[]
209
-
210
- the aliases of itself
211
-
212
- > `set` `static` **aliases**(`value`): `void`
213
-
214
- #### Parameters
215
-
216
- • **value**: `string`[]
217
-
218
- #### Returns
219
-
220
- `string`[]
221
-
222
- #### Inherited from
223
-
224
- `BaseFactory.aliases`
225
-
226
- #### Defined in
227
-
228
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:200
229
-
230
- ***
231
-
232
- ### Factory
233
-
234
- > `get` `static` **Factory**(): *typeof* `BaseFactory`
235
-
236
- The Root Factory class
237
-
238
- #### Returns
239
-
240
- *typeof* `BaseFactory`
241
-
242
- #### Inherited from
243
-
244
- `BaseFactory.Factory`
245
-
246
- #### Defined in
247
-
248
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:63
249
-
250
- ## Methods
251
-
252
- ### \_format()
253
-
254
- > **\_format**(`data`): `string` \| `Promise`\<`string`\>
255
-
256
- #### Parameters
257
-
258
- • **data**: `Record`\<`string`, `any`\>
259
-
260
- #### Returns
261
-
262
- `string` \| `Promise`\<`string`\>
263
-
264
- #### Defined in
265
-
266
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:105](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L105)
267
-
268
- ***
269
-
270
- ### \_initialize()
271
-
272
- > **\_initialize**(`options`?): `void`
273
-
274
- #### Parameters
275
-
276
- • **options?**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
277
-
278
- #### Returns
279
-
280
- `void`
281
-
282
- #### Defined in
283
-
284
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:92](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L92)
285
-
286
- ***
287
-
288
- ### filterData()
289
-
290
- > **filterData**(`data`): `Record`\<`string`, `any`\>
291
-
292
- Validate/filter the data in inputVariables
293
-
294
- #### Parameters
295
-
296
- • **data**: `Record`\<`string`, `any`\>
297
-
298
- #### Returns
299
-
300
- `Record`\<`string`, `any`\>
301
-
302
- #### Defined in
303
-
304
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:62](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L62)
305
-
306
- ***
307
-
308
- ### format()
309
-
310
- > **format**(`data`?): `Promise`\<`string`\>
311
-
312
- #### Parameters
313
-
314
- • **data?**: `Record`\<`string`, `any`\>
315
-
316
- #### Returns
317
-
318
- `Promise`\<`string`\>
319
-
320
- #### Defined in
321
-
322
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:109](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L109)
323
-
324
- ***
325
-
326
- ### initialize()
327
-
328
- > `abstract` **initialize**(`options`?): `void`
329
-
330
- **`Internal`**
331
-
332
- initialize instance method
333
-
334
- #### Parameters
335
-
336
- • **options?**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
337
-
338
- #### Returns
339
-
340
- `void`
341
-
342
- #### Overrides
343
-
344
- `BaseFactory.initialize`
345
-
346
- #### Defined in
347
-
348
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:96](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L96)
349
-
350
- ***
351
-
352
- ### partial()
353
-
354
- > **partial**(`data`): [`PromptTemplate`](PromptTemplate.md)
355
-
356
- it can make sense to "partial" a prompt template - eg pass in a subset of the required values, as to create a new prompt template which expects only the remaining subset of values.
357
-
358
- #### Parameters
359
-
360
- • **data**: `Record`\<`string`, `any`\>
361
-
362
- the partial data
363
-
364
- #### Returns
365
-
366
- [`PromptTemplate`](PromptTemplate.md)
367
-
368
- the new partial PromptTemplate instance
369
-
370
- #### Defined in
371
-
372
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:139](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L139)
373
-
374
- ***
375
-
376
- ### toJSON()
377
-
378
- > **toJSON**(`options`): [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
379
-
380
- #### Parameters
381
-
382
- • **options**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md) = `...`
383
-
384
- #### Returns
385
-
386
- [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
387
-
388
- #### Defined in
389
-
390
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:147](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L147)
391
-
392
- ***
393
-
394
- ### \_findRootFactory()
395
-
396
- > `static` **\_findRootFactory**(`aClass`): `undefined` \| *typeof* `BaseFactory`
397
-
398
- **`Internal`**
399
-
400
- find the real root factory
401
-
402
- #### Parameters
403
-
404
- • **aClass**: *typeof* `BaseFactory`
405
-
406
- the abstract root factory class
407
-
408
- #### Returns
409
-
410
- `undefined` \| *typeof* `BaseFactory`
411
-
412
- #### Inherited from
413
-
414
- `BaseFactory._findRootFactory`
415
-
416
- #### Defined in
417
-
418
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:99
419
-
420
- ***
421
-
422
- ### \_get()
423
-
424
- > `static` **\_get**(`name`): `any`
425
-
426
- #### Parameters
427
-
428
- • **name**: `any`
429
-
430
- #### Returns
431
-
432
- `any`
433
-
434
- #### Inherited from
435
-
436
- `BaseFactory._get`
437
-
438
- #### Defined in
439
-
440
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:234
441
-
442
- ***
443
-
444
- ### \_register()
445
-
446
- > `static` **\_register**(`aClass`, `aOptions`?): `boolean`
447
-
448
- **`Internal`**
449
-
450
- register the aClass to the factory
451
-
452
- #### Parameters
453
-
454
- • **aClass**: *typeof* `BaseFactory`
455
-
456
- the class to register the Factory
457
-
458
- • **aOptions?**: `any`
459
-
460
- the options for the class and the factory
461
-
462
- #### Returns
463
-
464
- `boolean`
465
-
466
- return true if successful.
467
-
468
- #### Inherited from
469
-
470
- `BaseFactory._register`
471
-
472
- #### Defined in
473
-
474
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:145
475
-
476
- ***
477
-
478
- ### cleanAliases()
479
-
480
- > `static` **cleanAliases**(`aName`): `void`
481
-
482
- remove all aliases of the registered item or itself
483
-
484
- #### Parameters
485
-
486
- • **aName**: `undefined` \| `string` \| *typeof* `BaseFactory`
487
-
488
- the registered item or name
489
-
490
- #### Returns
491
-
492
- `void`
493
-
494
- #### Inherited from
495
-
496
- `BaseFactory.cleanAliases`
497
-
498
- #### Defined in
499
-
500
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:162
501
-
502
- ***
503
-
504
- ### createObject()
505
-
506
- > `static` **createObject**(`aName`, `aOptions`): `undefined` \| `BaseFactory`
507
-
508
- Create a new object instance of Factory
509
-
510
- #### Parameters
511
-
512
- • **aName**: `string` \| `BaseFactory`
513
-
514
- • **aOptions**: `any`
515
-
516
- #### Returns
517
-
518
- `undefined` \| `BaseFactory`
519
-
520
- #### Inherited from
521
-
522
- `BaseFactory.createObject`
523
-
524
- #### Defined in
525
-
526
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:241
527
-
528
- ***
529
-
530
- ### findRootFactory()
531
-
532
- > `abstract` `static` **findRootFactory**(): `undefined` \| *typeof* `BaseFactory`
533
-
534
- **`Internal`**
535
-
536
- find the real root factory
537
-
538
- You can overwrite it to specify your root factory class
539
- or set _Factory directly.
540
-
541
- #### Returns
542
-
543
- `undefined` \| *typeof* `BaseFactory`
544
-
545
- the root factory class
546
-
547
- #### Inherited from
548
-
549
- `BaseFactory.findRootFactory`
550
-
551
- #### Defined in
552
-
553
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:92
554
-
555
- ***
556
-
557
- ### forEach()
558
-
559
- > `static` **forEach**(`cb`): `any`
560
-
561
- executes a provided callback function once for each registered element.
562
-
563
- #### Parameters
564
-
565
- • **cb**
566
-
567
- the forEach callback function
568
-
569
- #### Returns
570
-
571
- `any`
572
-
573
- #### Inherited from
574
-
575
- `BaseFactory.forEach`
576
-
577
- #### Defined in
578
-
579
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:227
580
-
581
- ***
582
-
583
- ### format()
584
-
585
- > `static` **format**(`options`): `Promise`\<`string`\>
586
-
587
- #### Parameters
588
-
589
- • **options**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
590
-
591
- #### Returns
592
-
593
- `Promise`\<`string`\>
594
-
595
- #### Defined in
596
-
597
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:31](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L31)
598
-
599
- ***
600
-
601
- ### formatIf()
602
-
603
- > `static` **formatIf**(`options`): `Promise`\<`undefined` \| `string`\>
604
-
605
- If the given options.template is the template, perform formatting using that template.
606
-
607
- #### Parameters
608
-
609
- • **options**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
610
-
611
- The options object to check for being a template and to format.
612
-
613
- #### Returns
614
-
615
- `Promise`\<`undefined` \| `string`\>
616
-
617
- A Promise that resolves to the formatted result if options is a template; otherwise, no value is returned.
618
-
619
- #### Defined in
620
-
621
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:41](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L41)
622
-
623
- ***
624
-
625
- ### formatName()
626
-
627
- > `abstract` `static` **formatName**(`aName`): `string`
628
-
629
- **`Internal`**
630
-
631
- format(transform) the name to be registered.
632
-
633
- defaults to returning the name unchanged. By overloading this method, case-insensitive names can be achieved.
634
-
635
- #### Parameters
636
-
637
- • **aName**: `string`
638
-
639
- #### Returns
640
-
641
- `string`
642
-
643
- #### Inherited from
644
-
645
- `BaseFactory.formatName`
646
-
647
- #### Defined in
648
-
649
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:116
650
-
651
- ***
652
-
653
- ### formatNameFromClass()
654
-
655
- > `static` **formatNameFromClass**(`aClass`, `aBaseNameOnly`?): `string`
656
-
657
- **`Internal`**
658
-
659
- format(transform) the name to be registered for the aClass
660
-
661
- #### Parameters
662
-
663
- • **aClass**: `any`
664
-
665
- • **aBaseNameOnly?**: `number`
666
-
667
- #### Returns
668
-
669
- `string`
670
-
671
- the name to register
672
-
673
- #### Inherited from
674
-
675
- `BaseFactory.formatNameFromClass`
676
-
677
- #### Defined in
678
-
679
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:130
680
-
681
- ***
682
-
683
- ### from()
684
-
685
- > `static` **from**(`template`?, `options`?): [`PromptTemplate`](PromptTemplate.md)
686
-
687
- #### Parameters
688
-
689
- • **template?**: `string` \| [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
690
-
691
- • **options?**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
692
-
693
- #### Returns
694
-
695
- [`PromptTemplate`](PromptTemplate.md)
696
-
697
- #### Defined in
698
-
699
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:27](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L27)
700
-
701
- ***
702
-
703
- ### get()
704
-
705
- > `static` **get**(`name`): `undefined` \| *typeof* `BaseFactory`
706
-
707
- Get the registered class via name
708
-
709
- #### Parameters
710
-
711
- • **name**: `any`
712
-
713
- #### Returns
714
-
715
- `undefined` \| *typeof* `BaseFactory`
716
-
717
- return the registered class if found the name
718
-
719
- #### Inherited from
720
-
721
- `BaseFactory.get`
722
-
723
- #### Defined in
724
-
725
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:233
726
-
727
- ***
728
-
729
- ### getAliases()
730
-
731
- > `static` **getAliases**(`aClass`): `string`[]
732
-
733
- get the aliases of the aClass
734
-
735
- #### Parameters
736
-
737
- • **aClass**: `undefined` \| `string` \| *typeof* `BaseFactory`
738
-
739
- the class or name to get aliases, means itself if no aClass specified
740
-
741
- #### Returns
742
-
743
- `string`[]
744
-
745
- aliases
746
-
747
- #### Inherited from
748
-
749
- `BaseFactory.getAliases`
750
-
751
- #### Defined in
752
-
753
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:195
754
-
755
- ***
756
-
757
- ### getDisplayName()
758
-
759
- > `static` **getDisplayName**(`aClass`): `undefined` \| `string`
760
-
761
- Get the display name from aClass
762
-
763
- #### Parameters
764
-
765
- • **aClass**: `undefined` \| `string` \| `Function`
766
-
767
- the class, name or itself, means itself if no aClass
768
-
769
- #### Returns
770
-
771
- `undefined` \| `string`
772
-
773
- #### Inherited from
774
-
775
- `BaseFactory.getDisplayName`
776
-
777
- #### Defined in
778
-
779
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:206
780
-
781
- ***
782
-
783
- ### getNameFrom()
784
-
785
- > `static` **getNameFrom**(`aClass`): `string`
786
-
787
- Get the unique(registered) name in the factory
788
-
789
- #### Parameters
790
-
791
- • **aClass**: `string` \| `Function`
792
-
793
- #### Returns
794
-
795
- `string`
796
-
797
- the unique name in the factory
798
-
799
- #### Inherited from
800
-
801
- `BaseFactory.getNameFrom`
802
-
803
- #### Defined in
804
-
805
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:122
806
-
807
- ***
808
-
809
- ### getRealName()
810
-
811
- > `static` **getRealName**(`name`): `any`
812
-
813
- #### Parameters
814
-
815
- • **name**: `any`
816
-
817
- #### Returns
818
-
819
- `any`
820
-
821
- #### Inherited from
822
-
823
- `BaseFactory.getRealName`
824
-
825
- #### Defined in
826
-
827
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:100
828
-
829
- ***
830
-
831
- ### getRealNameFromAlias()
832
-
833
- > `static` **getRealNameFromAlias**(`alias`): `undefined` \| `string`
834
-
835
- get the unique name in the factory from an alias name
836
-
837
- #### Parameters
838
-
839
- • **alias**: `string`
840
-
841
- the alias name
842
-
843
- #### Returns
844
-
845
- `undefined` \| `string`
846
-
847
- the unique name in the factory
848
-
849
- #### Inherited from
850
-
851
- `BaseFactory.getRealNameFromAlias`
852
-
853
- #### Defined in
854
-
855
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:106
856
-
857
- ***
858
-
859
- ### isTemplate()
860
-
861
- > `static` **isTemplate**(`templateOpt`): `any`
862
-
863
- #### Parameters
864
-
865
- • **templateOpt**: [`PromptTemplateOptions`](../interfaces/PromptTemplateOptions.md)
866
-
867
- #### Returns
868
-
869
- `any`
870
-
871
- #### Defined in
872
-
873
- [packages/ai-tool/src/utils/prompt/prompt-template.ts:48](https://github.com/isdk/ai-tool.js/blob/e324043799402aa2caa41711a9168487ab85c166/src/utils/prompt/prompt-template.ts#L48)
874
-
875
- ***
876
-
877
- ### register()
878
-
879
- > `static` **register**(...`args`): `boolean`
880
-
881
- register the aClass to the factory
882
-
883
- #### Parameters
884
-
885
- • ...**args**: `any`[]
886
-
887
- #### Returns
888
-
889
- `boolean`
890
-
891
- return true if successful.
892
-
893
- #### Inherited from
894
-
895
- `BaseFactory.register`
896
-
897
- #### Defined in
898
-
899
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:137
900
-
901
- ***
902
-
903
- ### registeredClass()
904
-
905
- > `static` **registeredClass**(`aName`): `false` \| *typeof* `BaseFactory`
906
-
907
- Check the name, alias or itself whether registered.
908
-
909
- #### Parameters
910
-
911
- • **aName**: `undefined` \| `string`
912
-
913
- the class name
914
-
915
- #### Returns
916
-
917
- `false` \| *typeof* `BaseFactory`
918
-
919
- the registered class if registered, otherwise returns false
920
-
921
- #### Inherited from
922
-
923
- `BaseFactory.registeredClass`
924
-
925
- #### Defined in
926
-
927
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:151
928
-
929
- ***
930
-
931
- ### removeAlias()
932
-
933
- > `static` **removeAlias**(...`aliases`): `void`
934
-
935
- remove specified aliases
936
-
937
- #### Parameters
938
-
939
- • ...**aliases**: `string`[]
940
-
941
- the aliases to remove
942
-
943
- #### Returns
944
-
945
- `void`
946
-
947
- #### Inherited from
948
-
949
- `BaseFactory.removeAlias`
950
-
951
- #### Defined in
952
-
953
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:167
954
-
955
- ***
956
-
957
- ### setAlias()
958
-
959
- > `static` **setAlias**(`aClass`, `alias`): `void`
960
-
961
- set alias to a class
962
-
963
- #### Parameters
964
-
965
- • **aClass**: `undefined` \| `string` \| *typeof* `BaseFactory`
966
-
967
- the class to set alias
968
-
969
- • **alias**: `string`
970
-
971
- #### Returns
972
-
973
- `void`
974
-
975
- #### Inherited from
976
-
977
- `BaseFactory.setAlias`
978
-
979
- #### Defined in
980
-
981
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:189
982
-
983
- ***
984
-
985
- ### setAliases()
986
-
987
- > `static` **setAliases**(`aClass`, ...`aAliases`): `void`
988
-
989
- set aliases to a class
990
-
991
- #### Parameters
992
-
993
- • **aClass**: `undefined` \| `string` \| *typeof* `BaseFactory`
994
-
995
- the class to set aliases
996
-
997
- • ...**aAliases**: `any`[]
998
-
999
- #### Returns
1000
-
1001
- `void`
1002
-
1003
- #### Example
1004
-
1005
- ```ts
1006
- import { BaseFactory } from 'custom-factory'
1007
- class Factory extends BaseFactory {}
1008
- const register = Factory.register.bind(Factory)
1009
- const aliases = Factory.setAliases.bind(Factory)
1010
- class MyFactory {}
1011
- register(MyFactory)
1012
- aliases(MyFactory, 'my', 'MY')
1013
- ```
1014
-
1015
- #### Inherited from
1016
-
1017
- `BaseFactory.setAliases`
1018
-
1019
- #### Defined in
1020
-
1021
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:183
1022
-
1023
- ***
1024
-
1025
- ### setDisplayName()
1026
-
1027
- > `static` **setDisplayName**(`aClass`, `aDisplayName`): `void`
1028
-
1029
- Set the display name to the aClass
1030
-
1031
- #### Parameters
1032
-
1033
- • **aClass**: `undefined` \| `string` \| `Function`
1034
-
1035
- the class, name or itself, means itself if no aClass
1036
-
1037
- • **aDisplayName**: `string` \| `object`
1038
-
1039
- the display name to set
1040
-
1041
- #### Returns
1042
-
1043
- `void`
1044
-
1045
- #### Inherited from
1046
-
1047
- `BaseFactory.setDisplayName`
1048
-
1049
- #### Defined in
1050
-
1051
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:212
1052
-
1053
- ***
1054
-
1055
- ### unregister()
1056
-
1057
- > `static` **unregister**(`aName`): `boolean`
1058
-
1059
- unregister this class in the factory
1060
-
1061
- #### Parameters
1062
-
1063
- • **aName**: `undefined` \| `string` \| `Function`
1064
-
1065
- the registered name or class, no name means unregister itself.
1066
-
1067
- #### Returns
1068
-
1069
- `boolean`
1070
-
1071
- true means successful
1072
-
1073
- #### Inherited from
1074
-
1075
- `BaseFactory.unregister`
1076
-
1077
- #### Defined in
1078
-
1079
- node\_modules/.pnpm/custom-factory@2.3.0/node\_modules/custom-factory/lib/base-factory.d.ts:157