chz-telegram-bot 0.7.13 → 0.7.15

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 (98) hide show
  1. package/dist/dtos/propertyProviderSets.d.ts +0 -1
  2. package/dist/dtos/propertyProviderSets.d.ts.map +1 -1
  3. package/dist/entities/actions/commandAction.d.ts +1 -1
  4. package/dist/entities/actions/commandAction.d.ts.map +1 -1
  5. package/dist/entities/actions/commandAction.js +2 -2
  6. package/dist/helpers/builders/commandActionBuilder.d.ts.map +1 -1
  7. package/dist/helpers/builders/commandActionBuilder.js +2 -3
  8. package/package.json +4 -1
  9. package/eslint.config.ts +0 -62
  10. package/src/builtin/helpAction.ts +0 -17
  11. package/src/dtos/chatHistoryMessage.ts +0 -22
  12. package/src/dtos/chatInfo.ts +0 -12
  13. package/src/dtos/commandTriggerCheckResult.ts +0 -40
  14. package/src/dtos/cooldownInfo.ts +0 -10
  15. package/src/dtos/incomingMessage.ts +0 -71
  16. package/src/dtos/incomingQuery.ts +0 -14
  17. package/src/dtos/messageInfo.ts +0 -15
  18. package/src/dtos/propertyProviderSets.ts +0 -21
  19. package/src/dtos/replyInfo.ts +0 -9
  20. package/src/dtos/responses/delay.ts +0 -28
  21. package/src/dtos/responses/imageMessage.ts +0 -41
  22. package/src/dtos/responses/inlineQueryResponse.ts +0 -26
  23. package/src/dtos/responses/reaction.ts +0 -30
  24. package/src/dtos/responses/textMessage.ts +0 -44
  25. package/src/dtos/responses/unpin.ts +0 -27
  26. package/src/dtos/responses/videoMessage.ts +0 -41
  27. package/src/dtos/userInfo.ts +0 -8
  28. package/src/entities/actions/commandAction.ts +0 -275
  29. package/src/entities/actions/inlineQueryAction.ts +0 -83
  30. package/src/entities/actions/replyCaptureAction.ts +0 -110
  31. package/src/entities/actions/scheduledAction.ts +0 -182
  32. package/src/entities/botInstance.ts +0 -92
  33. package/src/entities/cachedStateFactory.ts +0 -14
  34. package/src/entities/context/baseContext.ts +0 -111
  35. package/src/entities/context/chatContext.ts +0 -135
  36. package/src/entities/context/inlineQueryContext.ts +0 -63
  37. package/src/entities/context/messageContext.ts +0 -250
  38. package/src/entities/context/replyContext.ts +0 -260
  39. package/src/entities/states/actionStateBase.ts +0 -6
  40. package/src/entities/taskRecord.ts +0 -11
  41. package/src/helpers/builders/commandActionBuilder.ts +0 -214
  42. package/src/helpers/builders/inlineQueryActionBuilder.ts +0 -71
  43. package/src/helpers/builders/scheduledActionBuilder.ts +0 -143
  44. package/src/helpers/mapUtils.ts +0 -28
  45. package/src/helpers/noop.ts +0 -20
  46. package/src/helpers/objectFromEntries.ts +0 -7
  47. package/src/helpers/timeConvertions.ts +0 -13
  48. package/src/helpers/toArray.ts +0 -3
  49. package/src/helpers/traceFactory.ts +0 -11
  50. package/src/index.ts +0 -33
  51. package/src/main.ts +0 -76
  52. package/src/services/actionProcessingService.ts +0 -125
  53. package/src/services/actionProcessors/baseProcessor.ts +0 -67
  54. package/src/services/actionProcessors/commandActionProcessor.ts +0 -231
  55. package/src/services/actionProcessors/inlineQueryActionProcessor.ts +0 -165
  56. package/src/services/actionProcessors/scheduledActionProcessor.ts +0 -136
  57. package/src/services/jsonFileStorage.ts +0 -181
  58. package/src/services/nodeTimeoutScheduler.ts +0 -79
  59. package/src/services/responseProcessingQueue.ts +0 -57
  60. package/src/services/telegramApi.ts +0 -278
  61. package/src/types/action.ts +0 -15
  62. package/src/types/actionState.ts +0 -4
  63. package/src/types/cachedValueAccessor.ts +0 -1
  64. package/src/types/capture.ts +0 -33
  65. package/src/types/commandCondition.ts +0 -9
  66. package/src/types/commandTrigger.ts +0 -1
  67. package/src/types/events.ts +0 -286
  68. package/src/types/externalAliases.ts +0 -18
  69. package/src/types/handlers.ts +0 -26
  70. package/src/types/inputFile.ts +0 -4
  71. package/src/types/messageSendingOptions.ts +0 -10
  72. package/src/types/messageTypes.ts +0 -21
  73. package/src/types/propertyProvider.ts +0 -14
  74. package/src/types/response.ts +0 -51
  75. package/src/types/scheduler.ts +0 -20
  76. package/src/types/storage.ts +0 -23
  77. package/src/types/timeValues.ts +0 -33
  78. package/src/types/trace.ts +0 -5
  79. package/tests/dtos/commandTriggerCheckResult.test.ts +0 -301
  80. package/tests/entities/actions/inlineQueryAction.test.ts +0 -359
  81. package/tests/entities/actions/replyCaptureAction.test.ts +0 -501
  82. package/tests/entities/cachedStateFactory.test.ts +0 -98
  83. package/tests/entities/context/chatContext.test.ts +0 -606
  84. package/tests/entities/context/messageContext.test.ts +0 -370
  85. package/tests/entities/states/actionStateBase.test.ts +0 -138
  86. package/tests/entities/taskRecord.test.ts +0 -195
  87. package/tests/helpers/mapUtils.test.ts +0 -163
  88. package/tests/helpers/timeConvertions.test.ts +0 -129
  89. package/tests/services/actionProcessors/baseActionProcessor.test.ts +0 -359
  90. package/tests/services/actionProcessors/commandActionProcessor.test.ts +0 -268
  91. package/tests/services/actionProcessors/inlineQueryActionProcessor.test.ts +0 -616
  92. package/tests/services/actionProcessors/processorTestHelpers.ts +0 -147
  93. package/tests/services/actionProcessors/scheduledActionProcessor.test.ts +0 -153
  94. package/tests/services/jsonFileStorage.test.ts +0 -927
  95. package/tests/services/nodeTimeoutScheduler.test.ts +0 -421
  96. package/tests/services/responseProcessingQueue.test.ts +0 -388
  97. package/tsconfig.build.json +0 -8
  98. package/tsconfig.json +0 -118
@@ -1,388 +0,0 @@
1
- import { describe, test, expect, beforeEach } from 'bun:test';
2
- import {
3
- ResponseProcessingQueue,
4
- QueueItem
5
- } from '../../src/services/responseProcessingQueue';
6
-
7
- // Helper for creating simple void callbacks
8
- const noopCallback = () => Promise.resolve();
9
-
10
- describe('ResponseProcessingQueue', () => {
11
- let queue: ResponseProcessingQueue;
12
-
13
- beforeEach(() => {
14
- queue = new ResponseProcessingQueue();
15
- });
16
-
17
- describe('constructor', () => {
18
- test('should initialize with empty items array', () => {
19
- expect(queue.items).toEqual([]);
20
- });
21
-
22
- test('should initialize with isFlushing as false', () => {
23
- expect(queue.isFlushing).toBe(false);
24
- });
25
-
26
- test('should have rateLimiter defined', () => {
27
- expect(queue.rateLimiter).toBeDefined();
28
- });
29
- });
30
-
31
- describe('enqueue', () => {
32
- test('should add item to empty queue', () => {
33
- const item: QueueItem = {
34
- priority: 100,
35
- callback: noopCallback
36
- };
37
-
38
- queue.enqueue(item);
39
-
40
- expect(queue.items.length).toBe(1);
41
- expect(queue.items[0]).toBe(item);
42
- });
43
-
44
- test('should maintain priority order (lower priority first)', () => {
45
- queue.enqueue({ priority: 300, callback: noopCallback });
46
- queue.enqueue({ priority: 100, callback: noopCallback });
47
- queue.enqueue({ priority: 200, callback: noopCallback });
48
-
49
- expect(queue.items.map((i) => i.priority)).toEqual([100, 200, 300]);
50
- });
51
-
52
- test('should append item with equal priority to end', () => {
53
- queue.enqueue({ priority: 100, callback: noopCallback });
54
- queue.enqueue({ priority: 100, callback: noopCallback });
55
- queue.enqueue({ priority: 100, callback: noopCallback });
56
-
57
- expect(queue.items.length).toBe(3);
58
- expect(queue.items.every((i) => i.priority === 100)).toBe(true);
59
- });
60
-
61
- test('should insert at correct position for mixed priorities', () => {
62
- queue.enqueue({ priority: 100, callback: noopCallback });
63
- queue.enqueue({ priority: 300, callback: noopCallback });
64
- queue.enqueue({ priority: 200, callback: noopCallback });
65
- queue.enqueue({ priority: 150, callback: noopCallback });
66
- queue.enqueue({ priority: 250, callback: noopCallback });
67
-
68
- expect(queue.items.map((i) => i.priority)).toEqual([
69
- 100, 150, 200, 250, 300
70
- ]);
71
- });
72
-
73
- test('should handle inserting lowest priority item', () => {
74
- queue.enqueue({ priority: 200, callback: noopCallback });
75
- queue.enqueue({ priority: 300, callback: noopCallback });
76
- queue.enqueue({ priority: 100, callback: noopCallback }); // Lowest
77
-
78
- expect(queue.items.map((i) => i.priority)).toEqual([100, 200, 300]);
79
- });
80
-
81
- test('should handle inserting highest priority item', () => {
82
- queue.enqueue({ priority: 100, callback: noopCallback });
83
- queue.enqueue({ priority: 200, callback: noopCallback });
84
- queue.enqueue({ priority: 300, callback: noopCallback }); // Highest, appended
85
-
86
- expect(queue.items.map((i) => i.priority)).toEqual([100, 200, 300]);
87
- });
88
- });
89
-
90
- describe('flushReadyItems', () => {
91
- test('should process items with priority <= current time', async () => {
92
- const processed: number[] = [];
93
- const now = Date.now();
94
-
95
- queue.enqueue({
96
- priority: now - 100, // Past - should process
97
- callback: () => {
98
- processed.push(1);
99
- return Promise.resolve();
100
- }
101
- });
102
- queue.enqueue({
103
- priority: now - 50, // Past - should process
104
- callback: () => {
105
- processed.push(2);
106
- return Promise.resolve();
107
- }
108
- });
109
-
110
- await queue.flushReadyItems();
111
-
112
- expect(processed).toEqual([1, 2]);
113
- expect(queue.items.length).toBe(0);
114
- });
115
-
116
- test('should set isFlushing during processing', async () => {
117
- const now = Date.now();
118
- let wasFlushing = false;
119
-
120
- queue.enqueue({
121
- priority: now - 100,
122
- callback: () => {
123
- wasFlushing = queue.isFlushing;
124
- return Promise.resolve();
125
- }
126
- });
127
-
128
- await queue.flushReadyItems();
129
-
130
- expect(wasFlushing).toBe(true);
131
- expect(queue.isFlushing).toBe(false); // Reset after
132
- });
133
-
134
- test('should not start new flush if already flushing', async () => {
135
- const processed: number[] = [];
136
- const now = Date.now();
137
-
138
- queue.enqueue({
139
- priority: now - 100,
140
- callback: async () => {
141
- processed.push(1);
142
- // Try to start another flush while this one is running
143
- await queue.flushReadyItems(); // Should return immediately
144
- processed.push(2);
145
- }
146
- });
147
-
148
- await queue.flushReadyItems();
149
-
150
- expect(processed).toEqual([1, 2]);
151
- });
152
-
153
- test('should process items in priority order', async () => {
154
- const processed: number[] = [];
155
- const now = Date.now();
156
-
157
- queue.enqueue({
158
- priority: now - 50,
159
- callback: () => {
160
- processed.push(2);
161
- return Promise.resolve();
162
- }
163
- });
164
- queue.enqueue({
165
- priority: now - 100,
166
- callback: () => {
167
- processed.push(1);
168
- return Promise.resolve();
169
- }
170
- });
171
- queue.enqueue({
172
- priority: now - 25,
173
- callback: () => {
174
- processed.push(3);
175
- return Promise.resolve();
176
- }
177
- });
178
-
179
- await queue.flushReadyItems();
180
-
181
- expect(processed).toEqual([1, 2, 3]);
182
- });
183
-
184
- test('should handle empty queue', async () => {
185
- await queue.flushReadyItems();
186
- expect(queue.isFlushing).toBe(false);
187
- });
188
-
189
- test('should handle callback errors gracefully', async () => {
190
- const now = Date.now();
191
- const processed: number[] = [];
192
-
193
- queue.enqueue({
194
- priority: now - 100,
195
- callback: () => {
196
- processed.push(1);
197
- return Promise.resolve();
198
- }
199
- });
200
- queue.enqueue({
201
- priority: now - 50,
202
- callback: () => Promise.reject(new Error('Test error'))
203
- });
204
- queue.enqueue({
205
- priority: now - 25,
206
- callback: () => {
207
- processed.push(3);
208
- return Promise.resolve();
209
- }
210
- });
211
-
212
- // The queue processes and removes items but error propagates
213
- // In real usage, errors are caught in TelegramApiService
214
- try {
215
- await queue.flushReadyItems();
216
- } catch {
217
- // Expected
218
- }
219
-
220
- expect(processed.includes(1)).toBe(true);
221
- });
222
- });
223
-
224
- describe('priority as timestamp pattern', () => {
225
- // In TelegramApiService, priority = response.createdAt + offset
226
- // This pattern ensures responses are sent in order with delays
227
-
228
- test('should handle timestamp-based priorities', async () => {
229
- const processed: string[] = [];
230
- const baseTime = Date.now() - 100;
231
-
232
- // Simulate responses with offsets (delays)
233
- queue.enqueue({
234
- priority: baseTime, // First response
235
- callback: () => {
236
- processed.push('first');
237
- return Promise.resolve();
238
- }
239
- });
240
- queue.enqueue({
241
- priority: baseTime + 10, // Second response, 10ms delay
242
- callback: () => {
243
- processed.push('second');
244
- return Promise.resolve();
245
- }
246
- });
247
- queue.enqueue({
248
- priority: baseTime + 20, // Third response, 20ms delay
249
- callback: () => {
250
- processed.push('third');
251
- return Promise.resolve();
252
- }
253
- });
254
-
255
- await queue.flushReadyItems();
256
-
257
- expect(processed).toEqual(['first', 'second', 'third']);
258
- });
259
-
260
- test('should respect rate limiting between items', async () => {
261
- const timestamps: number[] = [];
262
- const now = Date.now();
263
-
264
- queue.enqueue({
265
- priority: now - 100,
266
- callback: () => {
267
- timestamps.push(Date.now());
268
- return Promise.resolve();
269
- }
270
- });
271
- queue.enqueue({
272
- priority: now - 50,
273
- callback: () => {
274
- timestamps.push(Date.now());
275
- return Promise.resolve();
276
- }
277
- });
278
- queue.enqueue({
279
- priority: now - 25,
280
- callback: () => {
281
- timestamps.push(Date.now());
282
- return Promise.resolve();
283
- }
284
- });
285
-
286
- await queue.flushReadyItems();
287
-
288
- // Rate limiter should add delay between items
289
- // TELEGRAM_RATELIMIT_DELAY is 35ms
290
- if (timestamps.length >= 2) {
291
- const gap = timestamps[1] - timestamps[0];
292
- expect(gap).toBeGreaterThanOrEqual(30); // Allow some tolerance
293
- }
294
- });
295
- });
296
-
297
- describe('concurrent enqueue and flush', () => {
298
- test('should handle items added during flush', async () => {
299
- const processed: number[] = [];
300
- const now = Date.now();
301
-
302
- queue.enqueue({
303
- priority: now - 100,
304
- callback: () => {
305
- processed.push(1);
306
- // Add new item during processing
307
- queue.enqueue({
308
- priority: now - 50,
309
- callback: () => {
310
- processed.push(2);
311
- return Promise.resolve();
312
- }
313
- });
314
- return Promise.resolve();
315
- }
316
- });
317
-
318
- await queue.flushReadyItems();
319
-
320
- // Item added during flush should also be processed
321
- expect(processed).toEqual([1, 2]);
322
- });
323
- });
324
-
325
- describe('TelegramApiService usage pattern', () => {
326
- // TelegramApiService enqueues responses with createdAt + offset as priority
327
-
328
- test('should support batched responses with delays', async () => {
329
- const sentMessages: string[] = [];
330
- const baseCreatedAt = Date.now() - 200;
331
-
332
- // Simulate enqueueBatchedResponses behavior
333
- type TestResponse =
334
- | { text: string; createdAt: number }
335
- | { text: string; delay: number };
336
-
337
- const responses: TestResponse[] = [
338
- { text: 'msg1', createdAt: baseCreatedAt },
339
- { text: 'delay', delay: 50 }, // Delay response
340
- { text: 'msg2', createdAt: baseCreatedAt }
341
- ];
342
-
343
- let offset = 0;
344
- for (const response of responses) {
345
- if ('delay' in response) {
346
- offset += response.delay;
347
- continue;
348
- }
349
-
350
- const text = response.text;
351
- queue.enqueue({
352
- priority: response.createdAt + offset,
353
- callback: () => {
354
- sentMessages.push(text);
355
- return Promise.resolve();
356
- }
357
- });
358
- }
359
-
360
- await queue.flushReadyItems();
361
-
362
- expect(sentMessages).toEqual(['msg1', 'msg2']);
363
- });
364
-
365
- test('should handle high volume of items', async () => {
366
- const now = Date.now();
367
- const itemCount = 100;
368
- let processedCount = 0;
369
-
370
- for (let i = 0; i < itemCount; i++) {
371
- queue.enqueue({
372
- priority: now - (itemCount - i),
373
- callback: () => {
374
- processedCount++;
375
- return Promise.resolve();
376
- }
377
- });
378
- }
379
-
380
- expect(queue.items.length).toBe(itemCount);
381
-
382
- await queue.flushReadyItems();
383
-
384
- expect(processedCount).toBe(itemCount);
385
- expect(queue.items.length).toBe(0);
386
- });
387
- });
388
- });
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "rootDir": "./src"
5
- },
6
- "include": ["src/**/*"],
7
- "exclude": ["node_modules", "dist", "tests"]
8
- }
package/tsconfig.json DELETED
@@ -1,118 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
4
-
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
-
13
- /* Language and Environment */
14
- "target": "es2024" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
- "lib": [
16
- "es2021",
17
- "DOM",
18
- "ES6",
19
- "DOM.Iterable",
20
- "ScriptHost"
21
- ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
22
- // "jsx": "preserve", /* Specify what JSX code is generated. */
23
- // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
24
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
25
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
26
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
27
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
28
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
29
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
30
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
31
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
32
-
33
- /* Modules */
34
- "module": "esnext" /* Specify what module code is generated. */,
35
- "rootDir": "." /* Specify the root folder within your source files. */,
36
- "moduleResolution": "bundler" /* Specify how TypeScript looks up a file from a given module specifier. */,
37
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
38
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
39
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
40
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
41
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
42
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
43
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
44
- // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
45
- // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
46
- // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
47
- // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
48
- // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
49
- // "resolveJsonModule": true, /* Enable importing .json files. */
50
- // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
51
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
52
-
53
- /* JavaScript Support */
54
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
55
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
56
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
57
-
58
- /* Emit */
59
- "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
60
- "declarationMap": true /* Create sourcemaps for d.ts files. */,
61
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
62
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
63
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
64
- // "noEmit": true, /* Disable emitting files from a compilation. */
65
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
66
- "outDir": "./dist" /* Specify an output folder for all emitted files. */,
67
- // "removeComments": true, /* Disable emitting comments. */
68
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
69
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
70
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
71
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
72
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
73
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
74
- // "newLine": "crlf", /* Set the newline character for emitting files. */
75
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
76
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
77
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
78
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
79
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
80
-
81
- /* Interop Constraints */
82
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
83
- // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
84
- // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
85
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
86
- "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
87
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
88
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
89
-
90
- /* Type Checking */
91
- "strict": true /* Enable all strict type-checking options. */,
92
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
93
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
94
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
95
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
96
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
97
- // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
98
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
99
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
100
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
101
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
102
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
103
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
104
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
105
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
106
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
107
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
108
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
109
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
110
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
111
-
112
- /* Completeness */
113
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
114
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
115
- },
116
- "include": ["src/**/*", "tests/**/*"],
117
- "exclude": ["node_modules", "dist"]
118
- }