{"id":18705600,"url":"https://github.com/angular-package/callback","last_synced_at":"2025-11-09T06:30:24.303Z","repository":{"id":47822254,"uuid":"392146987","full_name":"angular-package/callback","owner":"angular-package","description":"Manage the callback function.","archived":false,"fork":false,"pushed_at":"2021-09-28T22:21:40.000Z","size":183,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T21:39:57.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angular-package.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["angular-package"],"patreon":"sciborrudnicki","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-08-03T01:26:32.000Z","updated_at":"2021-08-12T18:40:53.000Z","dependencies_parsed_at":"2022-09-13T17:40:21.484Z","dependency_job_id":null,"html_url":"https://github.com/angular-package/callback","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-package%2Fcallback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-package%2Fcallback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-package%2Fcallback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular-package%2Fcallback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angular-package","download_url":"https://codeload.github.com/angular-package/callback/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239568462,"owners_count":19660683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T12:11:27.419Z","updated_at":"2025-11-09T06:30:24.250Z","avatar_url":"https://github.com/angular-package.png","language":"TypeScript","funding_links":["https://github.com/sponsors/angular-package","https://patreon.com/sciborrudnicki","https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026link=https://github.com/sponsors/angular-package"],"categories":[],"sub_categories":[],"readme":"# Packages\n\nUseful and simple to use packages based on the [angular.io][angulario].\n\n| Package                              | Description                                            | Status |\n| :----------------------------------- | :----------------------------------------------------- | -----: |\n| [callback][callback-github-readme]   | Manages the callback [function][js-function].          | [![npm version][callback-npm-badge-png]][callback-npm-badge] |\n| [change-detection][cd-github-readme] | Improves application performance.                      | [![npm version][cd-npm-badge-png]][cd-npm-badge] |\n| [component-loader][cl-github-readme] | Handles dynamic loading components.                    | [![npm version][cl-npm-badge-png]][cl-npm-badge] |\n| [core][core-github-readme]           | Core features.                                         | [![npm version][core-npm-badge-png]][core-npm-badge] |\n| [error][error-github-readme]         | Manages an [Error][js-error].                          | [![npm version][error-npm-badge-png]][error-npm-badge] |\n| [prism][prism-github-readme]         | [Prism][prism-js] highlighter module.                  | [![npm version][prism-npm-badge-png]][prism-npm-badge] |\n| [property][property-github-readme]   | Handles object properties.                             | [![npm version][property-npm-badge-png]][property-npm-badge] |\n| [reactive][reactive-github-readme]   | Automatize the process of creating some rxjs features. | [![npm version][reactive-npm-badge-png]][reactive-npm-badge] |\n| [testing][testing-github-readme]     | Support for testing other packages.                    | [![npm version][testing-npm-badge-png]][testing-npm-badge] |\n| [type][type-github-readme]           | Common types, type guards, and type checkers.          | [![npm version][type-npm-badge-png]][type-npm-badge] |\n| [ui][ui-github-readme]               | User interface.                                        | *In Progress* |\n\n\u003e Click on the package name to visit its [GitHub](https://github.com/) page.\n\n## angular-package/callback\n\nManages the callback [`function`][js-function].\n\n\u003c!-- npm badge --\u003e\n[![npm version][callback-npm-badge-svg]][callback-npm-badge]\n\u003c!-- GitHub badges --\u003e\n[![GitHub issues][callback-badge-issues]][callback-issues]\n[![GitHub forks][callback-badge-forks]][callback-forks]\n[![GitHub stars][callback-badge-stars]][callback-stars]\n[![GitHub license][callback-badge-license]][callback-license]\n\u003c!-- Sponsors badges --\u003e\n[![GitHub sponsors][github-badge-sponsor]][github-sponsor-link]\n[![Support me on Patreon][patreon-badge]][patreon-link]\n\n----\n\n## Table of contents\n\n* [Basic concepts](#basic-concepts)\n* [Skeleton](#skeleton)\n* [Installation](#installation)\n* [Api](#api)\n* [`Callback`](#callback)\n* [Interface](#interface)\n* [Type](#type)\n* [Git](#git)\n  * [Commit](#commit)\n  * [Versioning](#versioning)\n* [License](#license)\n\n----\n\n\u003cbr\u003e\n\n## Basic concepts\n\nChecks\n\u003e It's to check the provided value to be **the same** as **expected**.\n\nType guard (constrain)\n\u003e Constrains the parameter type to **not let** input **unexpected** value in the **code editor**.\n\nGuards\n\u003e It's a **combination** of both above, **constrains** the type of the parameter in the **code editor**, and checks its provided argument.\n\nDefines\n\u003e Returns defined value from a method of an object.  \n\u003e Defines new value in an object and returns a defined value.  \n\nGets\n\u003e Returns a value from an object.\n\nSets\n\u003e Adds or updates an element with a specified key and a value to an object and returns an object.  \n\n\u003cbr\u003e\n\n## Skeleton\n\nThis package was built by the [library skeleton][skeleton] which was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.1.1.\n\nCopy this package to the `packages/callback` folder of the [library skeleton][skeleton] then run the commands below.\n\n### Build\n\nRun `ng build callback` to build the package. The build artifacts will be stored in the `dist/` directory.\n\n### Running unit tests\n\nRun `ng test callback` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n\u003cbr\u003e\n\n## Installation\n\nInstall `@angular-package/callback` package with command:\n\n```bash\nnpm i @angular-package/callback --save\n```\n\n\u003cbr\u003e\n\n## Api\n\n```typescript\nimport {\n  // Class.\n  Callback,\n\n  // Type.\n  CallbackPayload\n} from '@angular-package/callback';\n```\n\n\u003cbr\u003e\n\n## `Callback`\n\nManages the callback [`function`][js-function] of a [`ResultCallback`](#resultcallback) type.\n\n\u003cbr\u003e\n\n**Static methods:**\n\n| Callback.                                                 | Description |\n| :-------------------------------------------------------- | :---------- |\n| [`defineResultCallback()`](#callbackdefineresultcallback) | Defines the [`function`][js-function] of [`ResultCallback`](#resultcallback) type that contains a [`ResultHandler`](#resulthandler) function to handle the `result` and optional `payload` |\n| [`defineErrorCallback()`](#callbackdefineerrorcallback)   | Defines the [`function`][js-function] of [`ResultCallback`](#resultcallback) type to throw [`ValidationError`][error-validationerror] with a specified message on a state from the `throwOnState` |\n| [`guard()`](#callbackguard)                               | Guards the provided `resultCallback` to be [`ResultCallback`](#resultcallback) type |\n| [`isCallback()`](#callbackiscallback)                     | Checks if the provided `value` is an instance of [`Callback`](#callback) with optional indicating allowed names under which callback functions can be stored |\n\n**Constructor:**\n\n| Constructor                           | Description |\n| :------------------------------------ | :---------- |\n| [`Callback()`](#callback-constructor) | Initialize an instance of a [`Callback`](#callback) with the allowed names under which callback functions can be stored |\n\n**Instance methods:**\n\n| Callback.prototype.                                 | Description |\n| :-------------------------------------------------- | :---------- |\n| [`getCallback()`][callback-getcallback]             | Gets from the storage specified by-name callback [`function`][js-function] of a [`ResultCallback`](#resultcallback) type |\n| [`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` |\n| [`setResultCallback()`][callback-setresultcallback] | Sets a callback  of a [`ResultCallback`](#resultcallback) type to the storage under the given allowed `name`, which is restricted by `AllowNames` |\n\n[callback-getcallback]: #callbackprototypegetcallback\n[callback-seterrorcallback]: #callbackprototypeseterrorcallback\n[callback-setresultcallback]: #callbackprototypesetresultcallback\n\n\u003cbr\u003e\n\n### `Callback` static methods\n\n----\n\n#### `Callback.defineResultCallback()`\n\nDefines the [`function`][js-function] of a [`ResultCallback`](#resultcallback) type that contains a [`ResultHandler`](#resulthandler) function to handle the `result` and optional `payload`.\n\n```typescript\nstatic defineResultCallback\u003cPayload extends object\u003e(\n  resultHandler: ResultHandler\u003cPayload\u003e,\n  capturePayload?: Payload\n): ResultCallback\u003cPayload\u003e {\n  return (result: boolean, payload?: Payload) =\u003e {\n    if (is.function(resultHandler)) {\n      resultHandler(result, payload);\n    }\n    return result;\n  };\n}\n```\n\n**Generic type variables:**\n\n| Name                     | Description |\n| :----------------------- | :---------- |\n| `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 |\n\n**Parameters:**\n\n| Name: type                              | Description |\n| :-------------------------------------- | :---------- |\n| `resultHandler: ResultHandler\u003cPayload\u003e` | The [`function`][js-function] that is guarded by the [`ResultHandler`](#resulthandler) type to handle the result and optional payload of the [`ResultCallback`](#resultcallback) function |\n| `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` |\n\n**Returns:**\n\n| Returns                   | Type       | Description  |\n| :------------------------ | :--------: | :----------- |\n| `ResultCallback\u003cPayload\u003e` | `Function` | The **return type** is a [`function`][js-function] of [`ResultCallback`](#resultcallback) |\n\nThe **return value** is a [`function`][js-function] of a [`ResultCallback`](#resultcallback) type that contains a [`function`][js-function] of [`ResultHandler`](#resulthandler).\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\nimport { is } from '@angular-package/type';\n\nconst stringCallback = Callback.defineResultCallback(\n  (result: boolean, payload) =\u003e {\n    if (is.false(result)) {\n      console.log(`Something went wrong`, payload);\n    }\n  }\n);\n\n// Returns in console 'Something went wrong' 5\nis.string(5, stringCallback);\n```\n\n```typescript\n// Another usage example.\nimport { Callback, ResultCallback } from '@angular-package/callback';\n\ntype Person = { id?: number; firstName?: string; age?: number };\n\nconst isPerson = (value: Person, callback: ResultCallback\u003cPerson\u003e): any =\u003e\n  callback(typeof value === 'object', value);\n\nconst personCallback = Callback.defineResultCallback(\n  (result: boolean, payload) =\u003e {\n    if (payload !== undefined) {\n      console.log(payload);\n    }\n    return result;\n  }\n);\n\n// Console returns { firstName: 'My name' }\nisPerson({ firstName: 'My name' }, personCallback);\n```\n\n\u003cbr\u003e\n\n#### `Callback.defineErrorCallback()`\n\nDefines [`function`][js-function] of [`ResultCallback`](#resultcallback) type to throw [`ValidationError`][error-validationerror] with a specified message on a state from `throwOnState`. Provided `payload` from defined callback function of [`ResultCallback`](#resultcallback) is being passed to a thrown error of [`ValidationError`][error-validationerror].\n\n```typescript\nstatic defineErrorCallback\u003cPayload extends object\u003e(\n  message: string | ErrorMessage,\n  throwOnState: boolean = false,\n  capturePayload?: Payload\n): ResultCallback\u003cPayload\u003e {\n  return Callback.defineResultCallback\u003cPayload\u003e(\n    (result: boolean, payload?: Payload): void =\u003e {\n      if (is.false(throwOnState) ? is.false(result) : is.true(result)) {\n        throw Object.assign(new ValidationError(message), { payload });\n      }\n    }\n  );\n}\n```\n\n**Generic type variables:**\n\n| Name                     | Description |\n| :----------------------- | :---------- |\n| `Payload extends object` | The shape of the optional payload parameter of the [`ResultCallback`](#resultcallback) function, which is constrained by the [`object`][js-object] type. Its value can be captured from a type of the provided `capturePayload` optional parameter |\n\n**Parameters:**\n\n| Name: type                        | Description |\n| :-------------------------------- | :---------- |\n| `message: string \\| ErrorMessage` | The message of [`string`][js-string] type or [`ErrorMessage`](#errormessage) interface to throw with an error of [`ValidationError`][error-validationerror] |\n| `throwOnState: boolean`           | A state of [`boolean`][js-boolean] type on which an error of [`ValidationError`][error-validationerror] should be thrown. By default, it's set to `false` |\n| `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` |\n\n**Returns:**\n\n| Returns                   | Type       | Description  |\n| :------------------------ | :--------: | :----------- |\n| `ResultCallback\u003cPayload\u003e` | `Function` | The **return type** is a [`function`][js-function] of a [`ResultCallback`](#resultcallback) type |\n\nThe **return value** is a [`function`][js-function] of a [`ResultCallback`](#resultcallback) type that throws a [`ValidationError`][error-validationerror].\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\nimport { is } from '@angular-package/type';\n\nconst stringCallback = Callback.defineErrorCallback('Something went wrong');\nis.string(5, stringCallback); // Throws ValidationError: Something went wrong\n```\n\n```typescript\nimport { Callback, ResultCallback } from '@angular-package/callback';\n\ntype Person = { id?: number; firstName?: string; age?: number };\n\nconst isPerson = (value: Person, callback: ResultCallback\u003cPerson\u003e): any =\u003e\n  callback(typeof value === 'object', value);\n\nconst personCallback = Callback.defineErrorCallback('It is not a person', true);\n\ntry {\n  isPerson({ id: 1, firstName: 'name', age: 27 }, personCallback);\n} catch (e) {\n  // Console returns {id: 1, firstName: \"name\", age: 27}\n  console.log(e.payload);\n}\n```\n\n\u003cbr\u003e\n\n#### `Callback.guard()`\n\nGuards the provided `resultCallback` to be [`ResultCallback`](#resultcallback) type.\n\n```typescript\nstatic guard\u003cPayload extends object\u003e(\n  resultCallback: ResultCallback\u003cPayload\u003e\n): resultCallback is ResultCallback\u003cPayload\u003e {\n  return guard.function(resultCallback);\n}\n```\n\n**Generic type variables:**\n\n| Name                     | Description |\n| :----------------------- | :---------- |\n| `Payload extends object` | The shape of the optional payload parameter of the [`ResultCallback`](#resultcallback) function, which is constrained by the [`object`][js-object] type |\n\n**Parameters:**\n\n| Name: type                                | Description |\n| :---------------------------------------- | :---------- |\n| `resultCallback: ResultCallback\u003cPayload\u003e` | The [`function`][js-function] of [`ResultCallback`](#resultcallback) type with the shape of payload from the generic type variable `Payload` to guard  |\n\n**Returns:**\n\n| Returns                                     | Type      | Description  |\n| :------------------------------------------ | :-------: | :----------- |\n| `resultCallback is ResultCallback\u003cPayload\u003e` | `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` |\n\nThe **return value** is a `boolean` indicating whether the provided `resultCallback` parameter is a [`function`][js-function].\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\n\nCallback.guard(result =\u003e result); // Returns `true`.\nCallback.guard({} as any); // Returns `false`.\n```\n\n\u003cbr\u003e\n\n#### `Callback.isCallback()`\n\nChecks if the provided `value` is an instance of [`Callback`](#callback) with optional indicating allowed names under which callback functions can be stored.\n\n```typescript\nstatic isCallback\u003cAllowNames extends string\u003e(\n  value: any,\n  ...allowNames: AllowNames[]\n): value is Callback\u003cAllowNames\u003e {\n  return is.instance(value, Callback);\n}\n```\n\n**Generic type variables:**\n\n| Name                        | Description |\n| :-------------------------- | :---------- |\n| `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\u003cAllowNames\u003e`. Its value can be captured from the provided `allowNames` rest parameter  |\n\n**Parameters:**\n\n| Name: type                    | Description |\n| :---------------------------- | :---------- |\n| `value: any`                  | The `value` of any type to check |\n| `...allowNames: AllowNames[]` | A rest parameter of `AllowNames` that is used only to capture the value by the generic type variable `AllowNames` to indicate allowed names for the `Callback\u003cAllowNames\u003e` return type |\n\n**Returns:**\n\n| Returns                         | Type      | Description |\n| :------------------------------ | :-------: | :---------- |\n| `value is Callback\u003cAllowNames\u003e` | `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` |\n\nThe **return value** is a `boolean` indicating whether the `value` is an instance of [`Callback`](#callback) .\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\n\nCallback.isCallback({}); // Returns `false`\nCallback.isCallback(new Callback()); // Returns `true`\n\nconst callback = new Callback('one', 'two', 'three');\nif (Callback.isCallback(callback)) {\n  callback.setCallback('one', result =\u003e result); // There's no hint on `name` parameter about allowed names.\n}\nif (Callback.isCallback(callback, 'one', 'two')) {\n  callback.setCallback('one', result =\u003e result); // There is a hint from the provided `allowNames` parameter of the `isCallback()` method.\n}\n```\n\n\u003cbr\u003e\n\n### `Callback` constructor\n\n----\n\n#### `Callback()`\n\nInitialize an instance of a [`Callback`](#callback) with the allowed names under which callback functions can be stored.\n\n```typescript\nnew Callback\u003cAllowNames extends string\u003e(...allowNames: AllowNames[]) {\n  this.#allowedNames = guard.array(allowNames)\n    ? new Set(allowNames)\n    : this.#allowedNames;\n}\n```\n\n**Generic type variables:**\n\n| Name                          | Description |\n| :---------------------------- | :---------- |\n| `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 |\n\n**Parameters:**\n\n| Name: type                   | Description |\n| :--------------------------- | :---------- |\n| `allowNames: AllowedNames[]` | A rest parameter of a [`string`][js-string] type allowed names under which callback functions can be stored. Only those names given by this parameter are being checked by the `isNameAllowed()` private method |\n\n**Returns:**\n\nThe **return value** is new instance of a [`Callback`](#callback).\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callback = new Callback('set', 'define');\n```\n\n\u003cbr\u003e\n\n### `Callback` instance methods\n\n----\n\n#### `Callback.prototype.getCallback()`\n\nGets from the storage specified by-name callback [`function`][js-function] of a [`ResultCallback`](#resultcallback) type.\n\n```typescript\npublic getCallback\u003c\n  Payload extends object,\n  Name extends AllowNames = AllowNames\n\u003e(\n  name: Name,\n  capturePayload?: Payload\n): Pick\u003cCallbackStorage\u003cPayload\u003e, Name\u003e[Name] {\n  return this.#storage.get(name);\n}\n```\n\n**Generic type variables:**\n\n| Name                      | Description |\n| :------------------------ | :---------- |\n| `Payload extends object`  | The shape of the optional payload parameter of the [`ResultCallback`](#resultcallback) function, which is constrained by the [`object`][js-object] type. Its value can be captured from a type of the provided `capturePayload` optional parameter |\n| `Name extends AllowNames` | A generic type variable `Name` constrained by the `AllowNames` indicates the name under which callback [`function`][js-function] is picked from the storage. It is linked with the return type `Pick\u003cCallbackStorage, Name\u003e[Name]` that refers exactly to the type, which is [`ResultCallback`](#resultcallback) of the callback [`function`][js-function] picked from the storage by `Name`. By default, its value is captured from the provided `name` |\n\n**Parameters:**\n\n| Name: type                 | Description |\n| :------------------------- | :---------- |\n| `name: Name`               | A [`string`][js-string] type name that is restricted by the `AllowNames` to pick stored callback [`function`][js-function] |\n| `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` |\n\n**Returns:**\n\n| Returns                             | Type       | Description |\n| :---------------------------------- | :--------: | :---------- |\n| `Pick\u003cCallbackStorage, Name\u003e[Name]` | `function` | The **return type** is a [`ResultCallback`](#resultcallback) [`function`][js-function] that is picked from the `CallbackStorage` by using `Name` |\n\nThe **return value** is the callback `function` of a [`ResultCallback`](#resultcallback) type picked from the storage.\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callback = new Callback('firstName');\n\ncallback\n  .setCallback('firstName', result =\u003e result) // Set the callback function under the given name.\n  .getCallback('firstName'); // Get the function stored under the given name.\n```\n\n```typescript\n// Generic type variable payload example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callbackInstance = new Callback('firstName');\n\n// Type for the `Payload`.\ntype CustomPayload = { id: number, name: string };\n\n// Set the callback function under the given name.\ncallbackInstance.setResultCallback\u003cCustomPayload\u003e('firstName', (result, payload) =\u003e {\n  if (payload) {\n    // It handles two properties from the payload.\n    // payload.id\n    // payload.name\n  }\n});\n\n// Get the function stored under the given name with the `CustomPayload` type.\nconst firstNameCallback = callbackInstance.getCallback\u003cCustomPayload\u003e('firstName');\n\n// Use the defined callback function with a defined `CustomPayload`.\nfirstNameCallback(false, { id: 5, name: 'there is no name', age: 1 }); // TypeError because of the `age`\n```\n\n```typescript\n// Captured payload example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callbackInstance = new Callback('firstName');\n\n// Constant from which is going to be captured type for the `Payload`.\nconst payLoadToCapture = { id: 1, name: '' };\n\n// Set the callback function under the given name.\ncallbackInstance.setResultCallback(\n  'firstName',\n  (result, payload) =\u003e {\n    if (payload) {\n      // It handles two properties from the payload.\n      // payload.id\n      // payload.name\n    }\n  },\n  payLoadToCapture\n);\n\n// Get the function stored under the given name.\nconst firstNameCallback = callbackInstance.getCallback(\n  'firstName',\n  payLoadToCapture\n);\n\n// Use the defined callback with a captured type of payload.\nfirstNameCallback(false, { id: 5, name: 'there is no name' });\n```\n\n\u003cbr\u003e\n\n#### `Callback.prototype.setErrorCallback`\n\nSets a [`function`][js-function] of a [`ResultCallback`](#resultcallback) type to the storage under the given allowed name with the given error message to throw on the specified state from the `throwOnState`.\n\n```typescript\npublic setErrorCallback\u003cName extends AllowNames\u003e(\n  name: Name,\n  message: string | ErrorMessage,\n  throwOnState: boolean = false\n): this {\n  this.setCallback(name, Callback.defineErrorCallback(message, throwOnState));\n  return this;\n}\n```\n\n**Generic type variables:**\n\n| Name                      | Description |\n| :------------------------ | :---------- |\n| `Name extends AllowNames` | A generic `Name` variable constrained by the `AllowNames` indicates the name under which callback [`function`][js-function] is stored. By default, its value is captured from the provided `name` |\n\n**Parameters:**\n\n| Name: type                        | Description |\n| :-------------------------------- | :---------- |\n| `name: Name`                      | A `string` type name that is restricted by the `AllowNames` under which the [`function`][js-function] is stored. The allowed status of the provided `name` is checked by the private method `isNameAllowed()` |\n| `message: string \\| ErrorMessage` | The message of string type or [`ErrorMessage`](#errormessage) interface, to throw with an error of [`ValidationError`][error-validationerror] |\n| `throwOnState: boolean`           | A state of [`boolean`][js-boolean] type on which an error of [`ValidationError`][error-validationerror] should be thrown. By default, it's set to `false` |\n\n**Returns:**\n\n| Returns | Type     | Description |\n| :------ | :------: | :---------- |\n| `this`  | `object` | The **return type** is an instance of `Callback` |\n\nThe **return value** is an instance of [`Callback`](#callback).\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callback = new Callback('firstName', 'lastName');\n\n// Set the error callback function under the given name.\ncallback.setErrorCallback('lastName', 'LastName must be a string type', false);\n```\n\n\u003cbr\u003e\n\n#### `Callback.prototype.setResultCallback()`\n\nSets a callback function of a [`ResultCallback`](#resultcallback) type to the storage under the given allowed `name` restricted by `AllowNames`.\n\n```typescript\npublic setResultCallback\u003c\n  Payload extends object,\n  Name extends AllowNames = AllowNames\n\u003e(\n  name: Name,\n  resultHandler: ResultHandler\u003cPayload\u003e,\n  capturePayload?: Payload\n): this {\n  if (this.isNameAllowed(name)) {\n    this.#storage.set(\n      name,\n      Callback.defineResultCallback\u003cPayload\u003e(resultHandler)\n    );\n  }\n  return this;\n}\n```\n\n**Generic type variables:**\n\n| Name                      | Description |\n| :------------------------ | :---------- |\n| `Payload extends object`  | The shape of the optional payload parameter of the [`ResultCallback`](#resultcallback) function, which is constrained by the [`object`][js-object] type. Its value can be captured from a type of the provided `capturePayload` optional parameter |\n| `Name extends AllowNames` | A generic type variable `Name` constrained by the `AllowNames` indicates the name under which callback [`function`][js-function] is stored. By default, its value is captured from the provided `name` |\n\n**Parameters:**\n\n| Name: type                     | Description |\n| :----------------------------- | :---------- |\n| `name: Name`                   | A `string` type name that is restricted by the `AllowNames` under which the [`function`][js-function] is stored. The allowed status of the provided `name` is checked by the private method `isNameAllowed()` |\n| `resultHandler: ResultHandler` | The [`function`][js-function] of [`ResultHandler`](#resulthandler) to handle the result of the [`ResultCallback`](#resultcallback) [`function`][js-function] before its result returns |\n\n**Returns:**\n\n| Returns | Type     | Description |\n| :------ | :------: | :---------- |\n| `this`  | `object` | The **return type** is an instance of `Callback` |\n\nThe **return value** is an instance of [`Callback`](#callback).\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callback = new Callback('firstName');\n\n// Set the callback function under the given name.\ncallback.setCallback('firstName', result =\u003e result) \n```\n\n```typescript\n// Generic type variable `Payload` example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callbackInstance = new Callback('firstName');\n\n// Type for the `Payload`.\ntype CustomPayload = { id: number; name: string };\n\n// Set the callback function under the given name.\ncallbackInstance.setResultCallback\u003cCustomPayload\u003e(\n  'firstName',\n  (result, payload) =\u003e {\n    if (payload) {\n      // It handles two properties from the payload.\n      // payload.id\n      // payload.name\n    }\n  }\n);\n```\n\n```typescript\n// Captured `Payload` example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callbackInstance = new Callback('firstName');\n\n// Constant from which is going to be captured type for the `Payload`.\nconst payLoadToCapture = { id: 1, name: '' };\n\n// Set the callback function under the given name.\ncallbackInstance.setResultCallback(\n  'firstName',\n  (result, payload) =\u003e {\n    if (payload) {\n      // It handles two properties from the payload.\n      // payload.id\n      // payload.name\n    }\n  },\n  payLoadToCapture\n);\n\n```\n\n**Full usage example:**\n\n```typescript\n// Generic type variable `Payload` example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callbackInstance = new Callback('firstName');\n\n// Type for the `Payload`.\ntype CustomPayload = { id: number, name: string };\n\n// Set the callback function under the given name.\ncallbackInstance.setResultCallback\u003cCustomPayload\u003e('firstName', (result, payload) =\u003e {\n  if (payload) {\n    // It handles two properties from the payload.\n    // payload.id\n    // payload.name\n  }\n});\n\n// Get the function stored under the given name with the `CustomPayload` type.\nconst firstNameCallback = callbackInstance.getCallback\u003cCustomPayload\u003e('firstName');\n\n// Use the defined callback function with a defined `CustomPayload`.\nfirstNameCallback(false, { id: 5, name: 'there is no name', age: 1 }); // TypeError because of the `age`\n```\n\n```typescript\n// Captured `Payload` example usage.\nimport { Callback } from '@angular-package/callback';\n/**\n * Initialize `Callback`.\n */\nconst callbackInstance = new Callback('firstName');\n\n// Constant from which is going to be captured type for the `Payload`.\nconst payLoadToCapture = { id: 1, name: '' };\n\n// Set the callback function under the given name.\ncallbackInstance.setResultCallback(\n  'firstName',\n  (result, payload) =\u003e {\n    if (payload) {\n      // It handles two properties from the payload.\n      // payload.id\n      // payload.name\n    }\n  },\n  payLoadToCapture\n);\n\n// Get the function stored under the given name.\nconst firstNameCallback = callbackInstance.getCallback(\n  'firstName',\n  payLoadToCapture\n);\n\n// Use the defined callback with a captured type of `Payload`.\nfirstNameCallback(false, { id: 5, name: 'there is no name' });\n```\n\n\u003cbr\u003e\n\n## Interface\n\n#### `CallbackPayload`\n\n![experimental]\n\nExperimental shape for a generic type variable `Payload`.\n\n```typescript\nexport interface CallbackPayload {\n  action?: string;\n  name?: string;\n  param?: string;\n  value?: any;\n  [index: string]: any;\n}\n```\n\n**Properties:**\n\n**`action?: string`**  \nAn optional action that describes the cause of performed callback.\n\n**`name?: string`**  \nAn optional name of the [`function`][js-function] or method that performed callback.\n\n**`param?: string`**  \nAn optional name of the parameter of a [`string`][js-string] type to which performed callback relates.\n\n**`value?: any`**  \nAn optional value of of related parameter of any type.\n\n**Usage:**\n\n```typescript\n// Example usage.\nimport { CallbackPayload, ResultCallback } from '@angular-package/callback';\n\n// Create a new function.\nconst isString = (\n  value: any,\n\n  // Parameter callback of `ResultCallback` type with the `CallbackPayload`.\n  callback: ResultCallback\u003cCallbackPayload\u003e\n): any =\u003e {\n  callback(typeof value === 'string', {\n    // Property from the `CallbackPayload`.\n    action: 'Checks the string of a firstName',\n\n    // Property from the `CallbackPayload`.\n    name: 'isString',\n\n    // Property from the `CallbackPayload`.\n    param: 'value',\n\n    // Property from the `CallbackPayload`.\n    value,\n\n    // Custom property.\n    firstName: 'my Name',\n  });\n};\n\n// The use of the `isString()` function.\nisString('it is a string', (result: boolean, payload) =\u003e {\n  if (payload !== undefined) {\n    /*\n    Returns {\n      action: \"Checks the string of a firstName\",\n      firstName: \"my Name\",\n      name: \"isString\",\n      param: \"value\",\n      value: \"it is a string\",\n    }\n    */\n    console.log(payload);\n  }\n  return result;\n});\n```\n\n\u003cbr\u003e\n\n## Type\n\n#### `ResultCallback`\n\nRepresents a callback function with parameters, a `result` of a [`boolean`][js-boolean] type, and an optional `payload` of a generic type `Payload`.\n\n```typescript\ntype ResultCallback\u003cPayload extends object = any\u003e = (\n  result: boolean,\n  payload?: Payload\n) =\u003e boolean;\n```\n\n**Generic type variables:**\n\n**`Payload extends object`**  \nThe shape of the optional `payload` parameter that is constrained by the [`object`][js-object] type.\n\n**Parameters:**\n\n**`result: boolean`**  \nResult of a [`boolean`][js-boolean] type that is returned. What the result concerns is not specified, so it can be anything - the creator decides.\n\n**`payload?: Payload`**  \nAn optional `object` of a generic type `Payload` to provide more data.\n\n**Returns:**\nThe return value is a [`boolean`][js-boolean] indicating state of the result of any action.\n\n\u003cbr\u003e\n\n#### `ResultHandler`\n\nFunction to handle the `result` and optional `payload` of the [`ResultCallback`](#resultcallback) function before its result returns.\n\n```typescript\ntype ResultHandler\u003cPayload extends object = any\u003e = (\n  result: boolean,\n  payload?: Payload\n) =\u003e void;\n```\n\n\u003cbr\u003e\n\n## GIT\n\n### Commit\n\n* [AngularJS Git Commit Message Conventions][git-commit-angular]\n* [Karma Git Commit Msg][git-commit-karma]\n* [Conventional Commits][git-commit-conventional]\n\n### Versioning\n\n[Semantic Versioning 2.0.0][git-semver]\n\n**Given a version number MAJOR.MINOR.PATCH, increment the:**\n\n* MAJOR version when you make incompatible API changes,\n* MINOR version when you add functionality in a backwards-compatible manner, and\n* PATCH version when you make backwards-compatible bug fixes.\n\nAdditional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.\n\n**FAQ**\nHow should I deal with revisions in the 0.y.z initial development phase?\n\n\u003e The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.\n\nHow do I know when to release 1.0.0?\n\n\u003e If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0.\n\n## License\n\nMIT © angular-package ([license][callback-license])\n\n\u003c!-- Funding --\u003e\n[github-badge-sponsor]: https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026link=https://github.com/sponsors/angular-package\n[github-sponsor-link]: https://github.com/sponsors/angular-package\n[patreon-badge]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dsciborrudnicki%26type%3Dpatrons\u0026style=flat\n[patreon-link]: https://patreon.com/sciborrudnicki\n\n[angulario]: https://angular.io\n[skeleton]: https://github.com/angular-package/skeleton\n\n\u003c!-- Update status --\u003e\n[experimental]: https://img.shields.io/badge/-experimental-orange\n[fix]: https://img.shields.io/badge/-fix-red\n[new]: https://img.shields.io/badge/-new-green\n[update]: https://img.shields.io/badge/-update-red\n\n\u003c!-- GIT --\u003e\n[git-semver]: http://semver.org/\n\n\u003c!-- GIT: commit --\u003e\n[git-commit-angular]: https://gist.github.com/stephenparish/9941e89d80e2bc58a153\n[git-commit-karma]: http://karma-runner.github.io/0.10/dev/git-commit-msg.html\n[git-commit-conventional]: https://www.conventionalcommits.org/en/v1.0.0/\n\n\u003c!-- This package: callback  --\u003e\n  \u003c!-- GitHub: badges --\u003e\n  [callback-badge-issues]: https://img.shields.io/github/issues/angular-package/callback\n  [callback-badge-forks]: https://img.shields.io/github/forks/angular-package/callback\n  [callback-badge-stars]: https://img.shields.io/github/stars/angular-package/callback\n  [callback-badge-license]: https://img.shields.io/github/license/angular-package/callback\n  \u003c!-- GitHub: badges links --\u003e\n  [callback-issues]: https://github.com/angular-package/callback/issues\n  [callback-forks]: https://github.com/angular-package/callback/network\n  [callback-license]: https://github.com/angular-package/callback/blob/master/LICENSE\n  [callback-stars]: https://github.com/angular-package/callback/stargazers\n\n\u003c!-- This package --\u003e\n\n\u003c!-- Package: callback --\u003e\n  \u003c!-- npm --\u003e\n  [callback-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fcallback.svg\n  [callback-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Fcallback.png\n  [callback-npm-badge]: https://badge.fury.io/js/%40angular-package%2Fcallback\n  [callback-npm-readme]: https://www.npmjs.com/package/@angular-package/callback#readme\n\n  \u003c!-- GitHub --\u003e\n  [callback-github-readme]: https://github.com/angular-package/callback#readme\n\n\u003c!-- Package: change-detection --\u003e\n  \u003c!-- npm --\u003e\n  [cd-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fchange-detection.svg\n  [cd-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Fchange-detection.png\n  [cd-npm-badge]: https://badge.fury.io/js/%40angular-package%2Fchange-detection\n  [cd-npm-readme]: https://www.npmjs.com/package/@angular-package/change-detection#readme\n\n  \u003c!-- GitHub --\u003e\n  [cd-github-readme]: https://github.com/angular-package/change-detection#readme\n\n\u003c!-- Package: component-loader --\u003e\n  \u003c!-- npm --\u003e\n  [cl-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fcomponent-loader.svg\n  [cl-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Fcomponent-loader.png\n  [cl-npm-badge]: https://badge.fury.io/js/%40angular-package%2Fcomponent-loader\n  [cl-npm-readme]: https://www.npmjs.com/package/@angular-package/component-loader#readme\n\n  \u003c!-- GitHub --\u003e\n  [cl-github-readme]: https://github.com/angular-package/component-loader#readme\n\n\u003c!-- Package: core --\u003e\n  \u003c!-- npm --\u003e\n  [core-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fcore.svg\n  [core-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Fcore.png\n  [core-npm-badge]: https://badge.fury.io/js/%40angular-package%2Fcore\n  [core-npm-readme]: https://www.npmjs.com/package/@angular-package/core#readme\n\n  \u003c!-- GitHub --\u003e\n  [core-github-readme]: https://github.com/angular-package/core#readme\n\n\u003c!-- Package: error --\u003e\n  \u003c!-- npm --\u003e\n  [error-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Ferror.svg\n  [error-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Ferror.png\n  [error-npm-badge]: https://badge.fury.io/js/%40angular-package%2Ferror\n  [error-npm-readme]: https://www.npmjs.com/package/@angular-package/error#readme\n\n  \u003c!-- GitHub --\u003e\n  [error-github-readme]: https://github.com/angular-package/error#readme\n\n  \u003c!-- error --\u003e\n  [error-validationerror]: https://github.com/angular-package/error#validationerror\n\n\u003c!-- Package: prism --\u003e\n  \u003c!-- npm --\u003e\n  [prism-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fprism.svg\n  [prism-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Fprism.png\n  [prism-npm-badge]: https://badge.fury.io/js/%40angular-package%2Fprism\n  [prism-npm-readme]: https://www.npmjs.com/package/@angular-package/prism#readme\n\n  \u003c!-- GitHub --\u003e\n  [prism-github-readme]: https://github.com/angular-package/prism#readme\n\n\u003c!-- Package: property --\u003e\n  \u003c!-- npm --\u003e\n  [property-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fproperty.svg\n  [property-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Fproperty.png\n  [property-npm-badge]: https://badge.fury.io/js/%40angular-package%2Fproperty\n  [property-npm-readme]: https://www.npmjs.com/package/@angular-package/property#readme\n\n  \u003c!-- GitHub --\u003e\n  [property-github-readme]: https://github.com/angular-package/property#readme\n\n\u003c!-- Package: reactive --\u003e\n  \u003c!-- npm --\u003e\n  [reactive-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Freactive.svg\n  [reactive-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Freactive.png\n  [reactive-npm-badge]: https://badge.fury.io/js/%40angular-package%2Freactive\n  [reactive-npm-readme]: https://www.npmjs.com/package/@angular-package/reactive#readme\n\n  \u003c!-- GitHub --\u003e\n  [reactive-github-readme]: https://github.com/angular-package/reactive#readme\n\n\u003c!-- Package: testing --\u003e\n  \u003c!-- npm --\u003e\n  [testing-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Ftesting.svg\n  [testing-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Ftesting.png\n  [testing-npm-badge]: https://badge.fury.io/js/%40angular-package%2Ftesting\n  [testing-npm-readme]: https://www.npmjs.com/package/@angular-package/testing#readme\n\n  \u003c!-- GitHub --\u003e\n  [testing-github-readme]: https://github.com/angular-package/testing#readme\n\n\u003c!-- Package: type --\u003e\n  \u003c!-- npm --\u003e\n  [type-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Ftype.svg\n  [type-npm-badge-png]: https://badge.fury.io/js/%40angular-package%2Ftype.png\n  [type-npm-badge]: https://badge.fury.io/js/%40angular-package%2Ftype\n  [type-npm-readme]: https://www.npmjs.com/package/@angular-package/type#readme\n\n  \u003c!-- GitHub --\u003e\n  [type-github-readme]: https://github.com/angular-package/type#readme\n\n  [package-type-resultcallback]: https://github.com/angular-package/type#resultcallback\n  [package-type-key]: https://github.com/angular-package/type#key\n\n\u003c!-- Package: ui --\u003e\n  \u003c!-- npm --\u003e\n  [ui-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fui.svg\n  [ui-npm-badge-svg]: https://badge.fury.io/js/%40angular-package%2Fui.svg\n  [ui-npm-badge]: https://badge.fury.io/js/%40angular-package%2Fui\n  [ui-npm-readme]: https://www.npmjs.com/package/@angular-package/ui#readme\n\n  \u003c!-- GitHub --\u003e\n  [ui-github-readme]: https://github.com/angular-package/ui#readme\n\n\u003c!-- Angular --\u003e\n[angular-component-factory-resolver]: https://angular.io/api/core/ComponentFactoryResolver\n[angular-view-container-ref]: https://angular.io/api/core/ViewContainerRef\n\n\u003c!-- Jasmine --\u003e\n[jasmine-describe]: https://jasmine.github.io/api/3.8/global.html#describe\n[jasmine-expect]: https://jasmine.github.io/api/3.8/global.html#expect\n[jasmine-it]: https://jasmine.github.io/api/3.8/global.html#it\n\n\u003c!-- Javascript  --\u003e\n[js-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n[js-array-every]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n[js-array-some]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n\n[js-bigint]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt\n[js-bigintconstructor]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/BigInt\n\n[js-boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n[js-booleanconstructor]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean/Boolean\n\n[js-classes]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\n[js-date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n\n[js-error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n\n[js-function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions\n[js-function-rest-parameter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters\n\n[js-getter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get\n[js-object-getownpropertydescriptor]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor\n[js-object-getOwnpropertydescriptors]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors\n\n[js-setter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set\n\n[js-hasownproperty]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty\n\n[js-instanceof]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof\n[js-in-operator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in\n\n[js-map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n\n[js-null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\n[js-number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n[js-numberconstructor]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/Number\n\n[js-object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n[js-object-define-property]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n\n[js-primitive]: https://developer.mozilla.org/en-US/docs/Glossary/Primitive\n[js-promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n\n[js-rangeerror]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\n[js-referenceerror]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\n[js-regexp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n\n[js-set]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n[js-storage]: https://developer.mozilla.org/en-US/docs/Web/API/Storage\n[js-string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n[js-stringconstructor]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/String\n\n[js-symbol]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\n[js-symbolconstructor]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/Symbol\n[js-syntaxerror]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\n\n[js-typeerror]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\n\n[js-undefined]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\n[js-urlerror]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\n\n[js-weakset]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\n\n\u003c!-- Karma --\u003e\n[karma]: http://karma-runner.github.io/0.10/index.html\n\n\u003c!-- Prism --\u003e\n[prism-js]: https://prismjs.com/\n\n\u003c!-- Typescript --\u003e\n[ts-classes]: https://www.typescriptlang.org/docs/handbook/2/classes.html\n[ts-function]: https://www.typescriptlang.org/docs/handbook/2/functions.html\n[ts-interface]: https://www.typescriptlang.org/docs/handbook/interfaces.html#our-first-interface\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangular-package%2Fcallback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangular-package%2Fcallback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangular-package%2Fcallback/lists"}