You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[`getCallback()`][callback-getcallback]| Gets from the storage specified by-name callback [`function`][js-function] of a [`ResultCallback`](#resultcallback) type |
145
-
|[`setErrorCallback()`][callback-seterrorcallback]| Sets a callback [`function`][js-function] of a [`ResultCallback`](#resultcallback) type that throws [`ValidationError`][error-validationerror] with a specified message on a state from the provided `throwOnState` to the storage under the given allowed name restricted by `AllowNames`|
146
-
|[`setResultCallback()`][callback-setcallback]| Sets a callback of a [`ResultCallback`](#resultcallback) type to the storage under the given allowed `name`, which is restricted by `AllowNames`|
|[`getCallback()`][callback-getcallback]| Gets from the storage specified by-name callback [`function`][js-function] of a [`ResultCallback`](#resultcallback) type |
145
+
|[`setErrorCallback()`][callback-seterrorcallback]| Sets a callback [`function`][js-function] of a [`ResultCallback`](#resultcallback) type that throws [`ValidationError`][error-validationerror] with a specified message on a state from the provided `throwOnState` to the storage under the given allowed name restricted by `AllowNames`|
146
+
|[`setResultCallback()`][callback-setresultcallback]| Sets a callback of a [`ResultCallback`](#resultcallback) type to the storage under the given allowed `name`, which is restricted by `AllowNames`|
|`Payload extends object`|A generic `Payload` variable that is constrained by the [`object`][js-object] type, is used by the type of `resultHandler` parameter and is linked with the return type`ResultCallback<Payload>`. Its value can be captured from the provided `capturePayload` optional parameter|
180
+
|`Payload extends object`|The shape of the optional payload parameter of the [`ResultCallback`](#resultcallback) and [`ResultHandler`](#resulthandler) function, which is constrained by the [`object`][js-object]type. Its value can be captured from a type of the provided `capturePayload` optional parameter |
|`resultHandler: ResultHandler<Payload>`| The [`function`][js-function]of [`ResultHandler`](#resulthandler) type to handle the `result` and optional `payload` of [`ResultCallback`](#resultcallback) function |
186
+
|`resultHandler: ResultHandler<Payload>`| The [`function`][js-function]that is guarded by the [`ResultHandler`](#resulthandler) type to handle the result and optional payload of the[`ResultCallback`](#resultcallback) function |
187
187
|`capturePayload?: Payload`| An optional [`object`][js-object] of generic type `Payload` that is used only to capture the value by the generic type variable `Payload`|
|`resultCallback: ResultCallback<Payload>`| The [`function`][js-function] of [`ResultCallback`](#resultcallback) type with the shape of payload from the generic variable `Payload` to guard |
335
+
|`resultCallback: ResultCallback<Payload>`| The [`function`][js-function] of [`ResultCallback`](#resultcallback) type with the shape of payload from the generic type variable `Payload` to guard |
|`resultCallback is ResultCallback<Payload>`|`boolean`| The **return type** is [`boolean`][js-boolean] as the result of its statement that indicates the provided `resultCallback` is a [`function`][js-function] of a [`ResultCallback`](#resultcallback) type with the shape of payload from the generic variable `Payload`|
341
+
|`resultCallback is ResultCallback<Payload>`|`boolean`| The **return type** is [`boolean`][js-boolean] as the result of its statement that indicates the provided `resultCallback` is a [`function`][js-function] of a [`ResultCallback`](#resultcallback) type with the shape of payload from the generic type variable `Payload`|
342
342
343
343
The **return value** is a `boolean` indicating whether the provided `resultCallback` parameter is a [`function`][js-function].
|`AllowNames extends string`| An optional generic variable of `AllowNames` name that is constrained by the [`string`][js-string] type and is used to indicate allowed names under which callback functions can be stored for the return type `value is Callback<AllowNames>`. Its value can be captured from the provided `allowNames` rest parameter |
374
+
|`AllowNames extends string`| An optional generic type variable of `AllowNames` name that is constrained by the [`string`][js-string] type and is used to indicate allowed names under which callback functions can be stored for the return type `value is Callback<AllowNames>`. Its value can be captured from the provided `allowNames` rest parameter |
|`value is Callback<AllowNames>`|`boolean`| The **return type** is `boolean` as the result of its statement that indicates the provided `value` is a [`Callback`](#callback) with allowed names from the provided `allowNames` parameter or generic variable `AllowNames`|
387
+
|`value is Callback<AllowNames>`|`boolean`| The **return type** is `boolean` as the result of its statement that indicates the provided `value` is a [`Callback`](#callback) with allowed names from the provided `allowNames` parameter or generic type variable `AllowNames`|
388
388
389
389
The **return value** is a `boolean` indicating whether the `value` is an instance of [`Callback`](#callback) .
390
390
@@ -428,7 +428,7 @@ new Callback<AllowNames extends string>(...allowNames: AllowNames[]) {
428
428
429
429
| Name | Description |
430
430
| :---------------------------- | :---------- |
431
-
|`AllowedNames extends string`| A generic variable `AllowNames` that is constrained by the [`string`][js-string] type and is used to **restrict** allowed names under which callback functions can be stored. By default, its value is captured from the provided `allowNames` rest parameter |
431
+
|`AllowedNames extends string`| A generic type variable `AllowNames` that is constrained by the [`string`][js-string] type and is used to **restrict** allowed names under which callback functions can be stored. By default, its value is captured from the provided `allowNames` rest parameter |
0 commit comments