cspell-lib 9.6.0 → 9.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cspell-rpc/api.d.ts +28 -0
- package/dist/cspell-rpc/api.js +6 -0
- package/dist/cspell-rpc/client.d.ts +17 -0
- package/dist/cspell-rpc/client.js +20 -0
- package/dist/cspell-rpc/index.d.ts +7 -0
- package/dist/cspell-rpc/index.js +4 -0
- package/dist/cspell-rpc/server.d.ts +16 -0
- package/dist/cspell-rpc/server.js +37 -0
- package/dist/cspell-rpc/spellCheckFile.d.ts +2 -0
- package/dist/cspell-rpc/spellCheckFile.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/lib/Settings/CSpellSettingsServer.d.ts +4 -2
- package/dist/lib/Settings/CSpellSettingsServer.js +10 -2
- package/dist/lib/Settings/Controller/configLoader/configLoader.js +1 -1
- package/dist/lib/Settings/Controller/configLoader/defaultSettings.js +1 -1
- package/dist/lib/Settings/Controller/configLoader/normalizeRawSettings.js +1 -1
- package/dist/lib/Settings/Controller/configLoader/types.d.ts +1 -1
- package/dist/lib/Settings/DefaultSettings.d.ts +1 -1
- package/dist/lib/Settings/DefaultSettings.js +1 -1
- package/dist/lib/Settings/InDocSettings.d.ts +0 -3
- package/dist/lib/Settings/InDocSettings.js +2 -3
- package/dist/lib/Settings/LanguageSettings.js +3 -3
- package/dist/lib/Settings/TextDocumentSettings.d.ts +1 -1
- package/dist/lib/Settings/index.d.ts +3 -1
- package/dist/lib/Settings/index.js +2 -1
- package/dist/lib/Settings/internal/CSpellSettingsInternalDef.d.ts +18 -0
- package/dist/lib/{Models → Settings/internal}/CSpellSettingsInternalDef.js +1 -10
- package/dist/lib/Settings/{DictionarySettings.d.ts → internal/DictionarySettings.d.ts} +3 -2
- package/dist/lib/Settings/{DictionarySettings.js → internal/DictionarySettings.js} +14 -9
- package/dist/lib/{Models/CSpellSettingsInternalDef.d.ts → Settings/internal/InternalDictionaryDef.d.ts} +2 -17
- package/dist/lib/Settings/internal/InternalDictionaryDef.js +10 -0
- package/dist/lib/Settings/internal/index.d.ts +6 -0
- package/dist/lib/Settings/internal/index.js +4 -0
- package/dist/lib/Settings/sanitizeSettings.d.ts +11 -0
- package/dist/lib/Settings/sanitizeSettings.js +254 -0
- package/dist/lib/Settings/util/settingsToJson.d.ts +28 -0
- package/dist/lib/Settings/util/settingsToJson.js +125 -0
- package/dist/lib/SpellingDictionary/Dictionaries.d.ts +1 -1
- package/dist/lib/SpellingDictionary/Dictionaries.js +1 -1
- package/dist/lib/SpellingDictionary/DictionaryController/DictionaryLoader.d.ts +1 -1
- package/dist/lib/SpellingDictionary/DictionaryController/DictionaryLoader.js +99 -20
- package/dist/lib/SpellingDictionary/DictionaryLoader.d.ts +1 -1
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -2
- package/dist/lib/perf/index.d.ts +1 -1
- package/dist/lib/perf/index.js +1 -1
- package/dist/lib/spellCheckFile.d.ts +10 -0
- package/dist/lib/spellCheckFile.js +24 -4
- package/dist/lib/suggestions.js +3 -3
- package/dist/lib/textValidation/cleanValidationIssue.d.ts +3 -0
- package/dist/lib/textValidation/cleanValidationIssue.js +21 -0
- package/dist/lib/textValidation/determineTextDocumentSettings.d.ts +1 -1
- package/dist/lib/textValidation/docValidator.d.ts +4 -1
- package/dist/lib/textValidation/docValidator.js +18 -1
- package/dist/lib/textValidation/settingsToValidateOptions.d.ts +1 -1
- package/dist/lib/util/clone.d.ts +35 -0
- package/dist/lib/util/clone.js +76 -0
- package/dist/lib/util/memoizeLastCall.d.ts +13 -0
- package/dist/lib/util/{memorizeLastCall.js → memoizeLastCall.js} +2 -2
- package/dist/lib/util/memoizeWeak.d.ts +6 -0
- package/dist/lib/util/{memorizerWeak.js → memoizeWeak.js} +2 -2
- package/dist/lib/util/text.js +6 -4
- package/dist/lib/util/textRegex.d.ts +2 -2
- package/dist/lib/util/textRegex.js +2 -2
- package/dist/rpc/Future.d.ts +18 -0
- package/dist/rpc/Future.js +49 -0
- package/dist/rpc/MessagePortEvents.d.ts +56 -0
- package/dist/rpc/MessagePortEvents.js +94 -0
- package/dist/rpc/assert.d.ts +14 -0
- package/dist/rpc/assert.js +21 -0
- package/dist/rpc/client.d.ts +186 -0
- package/dist/rpc/client.js +364 -0
- package/dist/rpc/errors.d.ts +24 -0
- package/dist/rpc/errors.js +47 -0
- package/dist/rpc/index.d.ts +11 -0
- package/dist/rpc/index.js +6 -0
- package/dist/rpc/messagePort.d.ts +34 -0
- package/dist/rpc/messagePort.js +2 -0
- package/dist/rpc/models.d.ts +134 -0
- package/dist/rpc/models.js +2 -0
- package/dist/rpc/modelsHelpers.d.ts +56 -0
- package/dist/rpc/modelsHelpers.js +117 -0
- package/dist/rpc/notify.d.ts +79 -0
- package/dist/rpc/notify.js +135 -0
- package/dist/rpc/protocol.d.ts +21 -0
- package/dist/rpc/protocol.js +17 -0
- package/dist/rpc/server.d.ts +39 -0
- package/dist/rpc/server.js +146 -0
- package/dist/rpc/types.d.ts +9 -0
- package/dist/rpc/types.js +2 -0
- package/dist/rpc.d.ts +2 -0
- package/dist/rpc.js +2 -0
- package/package.json +34 -21
- package/dist/lib/perf/performance.d.ts +0 -16
- package/dist/lib/perf/performance.js +0 -34
- package/dist/lib/util/memorizeLastCall.d.ts +0 -13
- package/dist/lib/util/memorizerWeak.d.ts +0 -6
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { assert } from './assert.js';
|
|
2
|
+
import { MalformedRPCRequestError, UnknownMethodRPCRequestError } from './errors.js';
|
|
3
|
+
import { MessagePortNotifyEvents } from './MessagePortEvents.js';
|
|
4
|
+
import { createRPCCanceledResponse, createRPCError, createRPCOkResponse, createRPCReadyResponse, createRPCResponse, isRPCBaseMessage, isRPCCancelRequest, isRPCOkRequest, isRPCReadyRequest, isRPCRequest, } from './modelsHelpers.js';
|
|
5
|
+
const RESPONSE_CODES = {
|
|
6
|
+
OK: 200,
|
|
7
|
+
BadRequest: 400,
|
|
8
|
+
RequestTimeout: 408,
|
|
9
|
+
InternalServerError: 500,
|
|
10
|
+
ServiceUnavailable: 503,
|
|
11
|
+
};
|
|
12
|
+
class RPCServerImpl {
|
|
13
|
+
#portWrapper;
|
|
14
|
+
#options;
|
|
15
|
+
#allowedMethods;
|
|
16
|
+
#methods;
|
|
17
|
+
#pendingRequests;
|
|
18
|
+
constructor(config, methods) {
|
|
19
|
+
this.#portWrapper = new MessagePortNotifyEvents(config.port);
|
|
20
|
+
this.#options = config;
|
|
21
|
+
this.#methods = methods;
|
|
22
|
+
this.#allowedMethods = new Set(Object.keys(this.#methods).filter((k) => typeof this.#methods[k] === 'function'));
|
|
23
|
+
this.#pendingRequests = new Map();
|
|
24
|
+
this.#portWrapper.onMessage((msg) => this.#handleMessage(msg));
|
|
25
|
+
this.#portWrapper.start();
|
|
26
|
+
this.#sendReadyResponse();
|
|
27
|
+
}
|
|
28
|
+
get #isClosed() {
|
|
29
|
+
return this.#portWrapper.isClosed;
|
|
30
|
+
}
|
|
31
|
+
#sendResponse(response) {
|
|
32
|
+
if (this.#isClosed)
|
|
33
|
+
return;
|
|
34
|
+
this.#portWrapper.postMessage(response);
|
|
35
|
+
}
|
|
36
|
+
#handleMessage(msg) {
|
|
37
|
+
let id = 0;
|
|
38
|
+
try {
|
|
39
|
+
if (!isRPCBaseMessage(msg)) {
|
|
40
|
+
if (this.#options.returnMalformedRPCRequestError) {
|
|
41
|
+
throw new MalformedRPCRequestError('Malformed RPC request', msg);
|
|
42
|
+
}
|
|
43
|
+
// Not a valid RPC message; ignore.
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
id = msg.id;
|
|
47
|
+
if (isRPCCancelRequest(msg)) {
|
|
48
|
+
// For now just remove it from pending requests.
|
|
49
|
+
// later, implement aborting the request if possible.
|
|
50
|
+
this.#pendingRequests.delete(msg.id);
|
|
51
|
+
this.#sendCancelResponse(msg.id, RESPONSE_CODES.OK);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (isRPCReadyRequest(msg)) {
|
|
55
|
+
this.#sendReadyResponse(msg.id);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (isRPCOkRequest(msg)) {
|
|
59
|
+
this.#sendResponse(createRPCOkResponse(msg.id, RESPONSE_CODES.OK));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!isRPCRequest(msg)) {
|
|
63
|
+
if (this.#options.returnMalformedRPCRequestError) {
|
|
64
|
+
throw new MalformedRPCRequestError('Malformed RPC request', msg);
|
|
65
|
+
}
|
|
66
|
+
// Not a request; ignore.
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.#handleRequest(msg);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
this.#sendErrorResponse(id, err);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
#sendReadyResponse(id) {
|
|
76
|
+
this.#sendResponse(createRPCReadyResponse(id || 0, RESPONSE_CODES.OK));
|
|
77
|
+
}
|
|
78
|
+
#isMethod(method) {
|
|
79
|
+
return this.#allowedMethods.has(method);
|
|
80
|
+
}
|
|
81
|
+
#handleRequest(msg) {
|
|
82
|
+
const handleAsync = async () => {
|
|
83
|
+
if (!this.#isMethod(msg.method)) {
|
|
84
|
+
this.#sendErrorResponse(msg.id, new UnknownMethodRPCRequestError(msg.method));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const method = msg.method;
|
|
88
|
+
const params = msg.params;
|
|
89
|
+
assert(Array.isArray(params), 'RPC method parameters must be an array');
|
|
90
|
+
assert(typeof this.#methods[method] === 'function', `RPC method ${method} is not a function`);
|
|
91
|
+
const result = await this.#methods[method](...params);
|
|
92
|
+
if (this.#pendingRequests.has(msg.id)) {
|
|
93
|
+
const response = createRPCResponse(msg.id, result, RESPONSE_CODES.OK);
|
|
94
|
+
this.#sendResponse(response);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
this.#pendingRequests.set(msg.id, {
|
|
98
|
+
requestMessage: msg,
|
|
99
|
+
promise: handleAsync().catch((err) => this.#sendErrorResponse(msg.id, err, RESPONSE_CODES.InternalServerError)),
|
|
100
|
+
});
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
#sendCancelResponse(id, code = RESPONSE_CODES.ServiceUnavailable) {
|
|
104
|
+
this.#sendResponse(createRPCCanceledResponse(id, code));
|
|
105
|
+
}
|
|
106
|
+
#sendErrorResponse(id, error, code = RESPONSE_CODES.BadRequest) {
|
|
107
|
+
try {
|
|
108
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
109
|
+
this.#sendResponse(createRPCError(id, err, code));
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
// Nothing to do if the port is closed.
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
#cancelAllRequests(reason) {
|
|
116
|
+
if (!this.#pendingRequests.size)
|
|
117
|
+
return;
|
|
118
|
+
reason ??= new Error('RPC Server is shutting down');
|
|
119
|
+
for (const id of this.#pendingRequests.keys()) {
|
|
120
|
+
this.#sendErrorResponse(id, reason);
|
|
121
|
+
}
|
|
122
|
+
this.#pendingRequests.clear();
|
|
123
|
+
}
|
|
124
|
+
[Symbol.dispose]() {
|
|
125
|
+
this.#cancelAllRequests();
|
|
126
|
+
if (this.#options.closePortOnDispose) {
|
|
127
|
+
this.#portWrapper.close();
|
|
128
|
+
}
|
|
129
|
+
this.#portWrapper[Symbol.dispose]();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* RPC Server implementation.
|
|
134
|
+
* @param ServerApi - The API methods of the server.
|
|
135
|
+
*/
|
|
136
|
+
export class RPCServer extends RPCServerImpl {
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @param config - The server configuration, including the message port and options.
|
|
140
|
+
* @param methods - The methods to implement the API.
|
|
141
|
+
*/
|
|
142
|
+
constructor(config, methods) {
|
|
143
|
+
super(config, methods);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ANY = any;
|
|
2
|
+
export type OnlyFunctionsOrNever<T> = T extends (...args: ANY[]) => ANY ? T : never;
|
|
3
|
+
export type ToReturnPromise<T extends (...args: ANY) => ANY> = T extends (...args: infer A) => infer R ? R extends Promise<ANY> ? (...args: A) => R : (...args: A) => Promise<R> : ANY;
|
|
4
|
+
export type PromiseOrNever<T> = T extends Promise<ANY> ? T : never;
|
|
5
|
+
export type RemovePromise<T> = T extends Promise<infer R> ? R : T;
|
|
6
|
+
export type StringKeyOf<T> = Exclude<Extract<keyof T, string>, number | symbol>;
|
|
7
|
+
export type MustExtendString<T> = T extends string ? T : never;
|
|
8
|
+
export type AsPromise<T> = T extends Promise<ANY> ? T : Promise<T>;
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/rpc.d.ts
ADDED
package/dist/rpc.js
ADDED
package/package.json
CHANGED
|
@@ -4,15 +4,27 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"provenance": true
|
|
6
6
|
},
|
|
7
|
-
"version": "9.6.
|
|
7
|
+
"version": "9.6.2",
|
|
8
8
|
"description": "A library of useful functions used across various cspell tools.",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
11
|
-
"types": "dist/
|
|
12
|
-
"module": "dist/
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"module": "dist/index.js",
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"import": "./dist/
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./rpc": {
|
|
18
|
+
"import": "./dist/rpc/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./cspell-rpc": {
|
|
21
|
+
"import": "./dist/cspell-rpc/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./cspell-rpc/server": {
|
|
24
|
+
"import": "./dist/cspell-rpc/server.js"
|
|
25
|
+
},
|
|
26
|
+
"./cspell-rpc/client": {
|
|
27
|
+
"import": "./dist/cspell-rpc/client.js"
|
|
16
28
|
}
|
|
17
29
|
},
|
|
18
30
|
"files": [
|
|
@@ -38,7 +50,7 @@
|
|
|
38
50
|
"test": "vitest run --pool=forks",
|
|
39
51
|
"test:update-snapshot": "vitest run -u",
|
|
40
52
|
"test:perf": "NODE_ENV=production insight --file \"**/*.perf.{mjs,js}\"",
|
|
41
|
-
"test:perf:ts": "NODE_ENV=production insight --file \"**/*.perf.{mts,ts}\"
|
|
53
|
+
"test:perf:ts": "NODE_ENV=production insight --file \"**/*.perf.{mts,ts}\" ",
|
|
42
54
|
"test:perf:prof": "NODE_ENV=production node --cpu-prof ../../node_modules/perf-insight/bin.mjs --file \"dist/**/*.perf.{mjs,js}\" -t 1000"
|
|
43
55
|
},
|
|
44
56
|
"repository": {
|
|
@@ -64,21 +76,22 @@
|
|
|
64
76
|
},
|
|
65
77
|
"homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-lib#readme",
|
|
66
78
|
"dependencies": {
|
|
67
|
-
"@cspell/cspell-bundled-dicts": "9.6.
|
|
68
|
-
"@cspell/cspell-
|
|
69
|
-
"@cspell/cspell-
|
|
70
|
-
"@cspell/cspell-
|
|
71
|
-
"@cspell/
|
|
72
|
-
"@cspell/
|
|
73
|
-
"@cspell/
|
|
74
|
-
"@cspell/
|
|
79
|
+
"@cspell/cspell-bundled-dicts": "9.6.2",
|
|
80
|
+
"@cspell/cspell-performance-monitor": "9.6.2",
|
|
81
|
+
"@cspell/cspell-pipe": "9.6.2",
|
|
82
|
+
"@cspell/cspell-resolver": "9.6.2",
|
|
83
|
+
"@cspell/cspell-types": "9.6.2",
|
|
84
|
+
"@cspell/dynamic-import": "9.6.2",
|
|
85
|
+
"@cspell/filetypes": "9.6.2",
|
|
86
|
+
"@cspell/strong-weak-map": "9.6.2",
|
|
87
|
+
"@cspell/url": "9.6.2",
|
|
75
88
|
"clear-module": "^4.1.2",
|
|
76
|
-
"cspell-config-lib": "9.6.
|
|
77
|
-
"cspell-dictionary": "9.6.
|
|
78
|
-
"cspell-glob": "9.6.
|
|
79
|
-
"cspell-grammar": "9.6.
|
|
80
|
-
"cspell-io": "9.6.
|
|
81
|
-
"cspell-trie-lib": "9.6.
|
|
89
|
+
"cspell-config-lib": "9.6.2",
|
|
90
|
+
"cspell-dictionary": "9.6.2",
|
|
91
|
+
"cspell-glob": "9.6.2",
|
|
92
|
+
"cspell-grammar": "9.6.2",
|
|
93
|
+
"cspell-io": "9.6.2",
|
|
94
|
+
"cspell-trie-lib": "9.6.2",
|
|
82
95
|
"env-paths": "^3.0.0",
|
|
83
96
|
"gensequence": "^8.0.8",
|
|
84
97
|
"import-fresh": "^3.3.1",
|
|
@@ -91,7 +104,7 @@
|
|
|
91
104
|
"node": ">=20"
|
|
92
105
|
},
|
|
93
106
|
"devDependencies": {
|
|
94
|
-
"@cspell/cspell-tools": "9.6.
|
|
107
|
+
"@cspell/cspell-tools": "9.6.2",
|
|
95
108
|
"@cspell/dict-cpp": "^7.0.2",
|
|
96
109
|
"@cspell/dict-csharp": "^4.0.8",
|
|
97
110
|
"@cspell/dict-css": "^4.0.19",
|
|
@@ -109,5 +122,5 @@
|
|
|
109
122
|
"lorem-ipsum": "^2.0.8",
|
|
110
123
|
"perf-insight": "^2.0.1"
|
|
111
124
|
},
|
|
112
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "646e18a04ff36d43f78a74e5055540e0f5297e91"
|
|
113
126
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare function measurePerfStart(name: string): void;
|
|
2
|
-
export declare function measurePerfEnd(name: string): void;
|
|
3
|
-
/**
|
|
4
|
-
* Creates performance marks and measures the time taken between them.
|
|
5
|
-
* @param name - name of the performance entry
|
|
6
|
-
* @returns a function to stop the timer.
|
|
7
|
-
*/
|
|
8
|
-
export declare function measurePerf(name: string): () => void;
|
|
9
|
-
/**
|
|
10
|
-
* Measure the performance of a function.
|
|
11
|
-
* @param name - name of the performance entry
|
|
12
|
-
* @param fn - function to measure
|
|
13
|
-
* @returns the result of the function
|
|
14
|
-
*/
|
|
15
|
-
export declare function measurePerfFn<R>(name: string, fn: () => R): R;
|
|
16
|
-
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export function measurePerfStart(name) {
|
|
2
|
-
performance.mark(name + '-start');
|
|
3
|
-
}
|
|
4
|
-
export function measurePerfEnd(name) {
|
|
5
|
-
performance.mark(name + '-end');
|
|
6
|
-
performance.measure(name, name + '-start', name + '-end');
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Creates performance marks and measures the time taken between them.
|
|
10
|
-
* @param name - name of the performance entry
|
|
11
|
-
* @returns a function to stop the timer.
|
|
12
|
-
*/
|
|
13
|
-
export function measurePerf(name) {
|
|
14
|
-
measurePerfStart(name);
|
|
15
|
-
return () => {
|
|
16
|
-
measurePerfEnd(name);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Measure the performance of a function.
|
|
21
|
-
* @param name - name of the performance entry
|
|
22
|
-
* @param fn - function to measure
|
|
23
|
-
* @returns the result of the function
|
|
24
|
-
*/
|
|
25
|
-
export function measurePerfFn(name, fn) {
|
|
26
|
-
const perfEnd = measurePerf(name);
|
|
27
|
-
try {
|
|
28
|
-
return fn();
|
|
29
|
-
}
|
|
30
|
-
finally {
|
|
31
|
-
perfEnd();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=performance.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a function that memorizes the last call. If the next call is called with the same arguments, the
|
|
3
|
-
* the last value is returned.
|
|
4
|
-
* @param fn - function to memorize
|
|
5
|
-
* @returns a new function.
|
|
6
|
-
*/
|
|
7
|
-
export declare function memorizeLastCall<T>(fn: (...p: []) => T): (...p: []) => T;
|
|
8
|
-
export declare function memorizeLastCall<T, K0>(fn: (...p: [K0]) => T): (...p: [K0]) => T;
|
|
9
|
-
export declare function memorizeLastCall<T, K0, K1>(fn: (...p: [K0, K1]) => T): (...p: [K0, K1]) => T;
|
|
10
|
-
export declare function memorizeLastCall<T, K0, K1, K2>(fn: (...p: [K0, K1, K2]) => T): (...p: [K0, K1, K2]) => T;
|
|
11
|
-
export declare function memorizeLastCall<T, K0, K1, K2, K3>(fn: (...p: [K0, K1, K2, K3]) => T): (...p: [K0, K1, K2, K3]) => T;
|
|
12
|
-
export declare function memorizeLastCall<T, K>(fn: (...p: [...K[]]) => T): (...p: [...K[]]) => T;
|
|
13
|
-
//# sourceMappingURL=memorizeLastCall.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function memorizerWeak<T, K extends object>(fn: (...p: [...K[]]) => T): (...p: [...K[]]) => T;
|
|
2
|
-
export declare function memorizerWeak<T, K0 extends object, K1 extends object>(fn: (...p: [K0, K1]) => T): (...p: [K0, K1]) => T;
|
|
3
|
-
export declare function memorizerWeak<T, K0 extends object, K1 extends object, K2 extends object>(fn: (...p: [K0, K1, K2]) => T): (...p: [K0, K1, K2]) => T;
|
|
4
|
-
export declare function memorizerWeak<T, K0 extends object, K1 extends object, K2 extends object, K3 extends object>(fn: (...p: [K0, K1, K2, K3]) => T): (...p: [K0, K1, K2, K3]) => T;
|
|
5
|
-
export declare function memorizerWeak<T, K0 extends object>(fn: (...p: [K0]) => T): (...p: [K0]) => T;
|
|
6
|
-
//# sourceMappingURL=memorizerWeak.d.ts.map
|