{"id":26169977,"url":"https://github.com/parloti/ngrx-set","last_synced_at":"2026-01-12T01:52:13.645Z","repository":{"id":172720617,"uuid":"649487147","full_name":"parloti/ngrx-set","owner":"parloti","description":"It simplifies the creation of actions for asynchronous requests that can succeed, fail or be aborted.","archived":false,"fork":false,"pushed_at":"2025-07-28T21:44:32.000Z","size":1162,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T23:24:38.535Z","etag":null,"topics":["angular","ngrx","ngrx-store","rxjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ngrx-set","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parloti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-05T01:26:40.000Z","updated_at":"2025-07-28T21:44:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa191fde-b74d-4a19-9d07-5a607b71a910","html_url":"https://github.com/parloti/ngrx-set","commit_stats":null,"previous_names":["parloti/ngrx-set"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/parloti/ngrx-set","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parloti%2Fngrx-set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parloti%2Fngrx-set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parloti%2Fngrx-set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parloti%2Fngrx-set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parloti","download_url":"https://codeload.github.com/parloti/ngrx-set/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parloti%2Fngrx-set/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["angular","ngrx","ngrx-store","rxjs"],"created_at":"2025-03-11T19:01:13.771Z","updated_at":"2026-01-12T01:52:13.639Z","avatar_url":"https://github.com/parloti.png","language":"TypeScript","funding_links":[],"categories":["State Management"],"sub_categories":["NgRx"],"readme":"# NgRxSet\n\nIt simplifies the creation of actions for asynchronous requests that can succeed, fail or be aborted.\n\n## Usage\n\n```ts\nconst set = createSet('source', 'name');\nstore.dispatch(set.dispatch());\nstore.dispatch(set.success());\nstore.dispatch(set.failure());\nstore.dispatch(set.abort());\n```\n\n## Examples\n\nMore examples at:\n\n[store.ts#creators](projects/example-app/src/app/store.ts#L17)\n\n[example-effects.ts](projects/example-app/src/app/example-effects.ts)\n\n## API\n\n### IAbortCreator\n\nCreator to be used when the request is aborted.\n\n`type IAbortCreator\u003cTType extends string = string\u003e`\n\n`abort({ reason: 'reason' });`\n\n### IFailureCreator\n\nCreator to be used when the request fails.\n\n`type IFailureCreator\u003cTType extends string = string\u003e`\n\n`failure({ error: 'error' });`\n\n### IQueryCreator\n\nCreator to be used when submitting a query to trigger the request.\n\n`type IQueryCreator\u003cTQuery, TType extends string = string\u003e`\n\n`dispatch({ query: TQuery });`\n\n### IPayloadCreator\n\nCreator to be used when receiving the request payload.\n\n`type IPayloadCreator\u003cTPayload, TType extends string = string\u003e`\n\n`success({ payload: TPayload });`\n\n### IEmptyCreator\n\nCreator to be used without passing data.\n\n`type IEmptyCreator\u003cTType extends string\u003e`\n\n`dispatch();`\n`success();`\n\n### ICreatorSet\n\nA set of creators related to a request.\n\n```\ninterface ICreatorSet\u003c\n  TDispatch extends ICreator\u003cobject, string\u003e | IEmptyCreator\u003cstring\u003e,\n  TSuccess extends ICreator\u003cobject, string\u003e | IEmptyCreator\u003cstring\u003e,\n  TReasonType extends string = string,\n  TErrorType extends string = string,\n\u003e {\n  abort: IAbortCreator\u003cTReasonType\u003e;\n  dispatch: TDispatch;\n  failure: IFailureCreator\u003cTErrorType\u003e;\n  success: TSuccess;\n}\n```\n\n#### ICreatorSet aliases\n\nWhen neither dispatch nor success carry data.\n\n```\ntype IEmptySet\u003c\n  TSource extends string = string,\n  TName extends string = string,\n\u003e = ICreatorSet\u003c\n  IEmptyCreator\u003cIDispatchType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IEmptyCreator\u003cISuccessType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IAbortType\u003c`${IType\u003cTSource, TName\u003e}`\u003e,\n  IFailureType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\n\u003e;\n\ncreateSet('source', 'name'): IEmptySet\u003c\"source\", \"name\"\u003e;\n```\n\nWhen the dispatch action carries data but success does not.\n\n```\ntype IQuerySet\u003c\n  TQuery,\n  TSource extends string,\n  TName extends string,\n\u003e = ICreatorSet\u003c\n  IQueryCreator\u003cTQuery, IDispatchType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IEmptyCreator\u003cISuccessType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IAbortType\u003c`${IType\u003cTSource, TName\u003e}`\u003e,\n  IFailureType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\n\u003e;\n\ncreateSet\u003cIQuery\u003e('source', 'name'): IQuerySet\u003cIMyQuery, string, string\u003e;\ncreateSet\u003cIQuery, 'source', 'name'\u003e('source', 'name'): IQuerySet\u003cIQuery, \"source\", \"name\"\u003e;\n```\n\nWhen the dispatch action does not carry data but success does.\n\n```\ntype IPayloadSet\u003c\n  TPayload,\n  TSource extends string,\n  TName extends string,\n\u003e = ICreatorSet\u003c\n  IEmptyCreator\u003cIDispatchType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IPayloadCreator\u003cTPayload, ISuccessType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IAbortType\u003c`${IType\u003cTSource, TName\u003e}`\u003e,\n  IFailureType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\n\u003e;\n\ncreateSet\u003cvoid, IPayload\u003e('source', 'name'): IPayloadSet\u003cIPayload, string, string\u003e;\ncreateSet\u003cvoid, IPayload, 'source', 'name'\u003e('source', 'name'): IPayloadSet\u003cIPayload, \"source\", \"name\"\u003e\n```\n\nWhen both the dispatch and success actions carry data.\n\n```\ntype IFullSet\u003c\n  TQuery,\n  TPayload,\n  TSource extends string,\n  TName extends string,\n\u003e = ICreatorSet\u003c\n  IQueryCreator\u003cTQuery, IDispatchType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IPayloadCreator\u003cTPayload, ISuccessType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\u003e,\n  IAbortType\u003c`${IType\u003cTSource, TName\u003e}`\u003e,\n  IFailureType\u003c`${IType\u003cTSource, TName\u003e}`\u003e\n\u003e;\n\ncreateSet\u003cIQuery, IPayload\u003e('source', 'name'): IFullSet\u003cIQuery, IPayload, string, string\u003e\u003e;\ncreateSet\u003cIQuery, IPayload, 'source', 'name'\u003e('source', 'name'): IFullSet\u003cIQuery, IPayload, \"source\", \"name\"\u003e;\n```\n\n## Support\n\nIf you like `ngrx-set`, please support it:\n\n- [with a star on GitHub](https://github.com/parloti/ngrx-set)\n- [with a tweet](https://twitter.com/intent/tweet?text=Check%20ngrx-set%20package%20%23angular%20%23rxjs%20%23ngrx%26url%3Dhttps%3A%2F%2Fgithub.com%2Fparloti%2Fngrx-set)\n\nThank you!\n\nP.S. If you need help, feel free to\n\n- Contact me on [twitter](https://twitter.com/parloti) or [linkedin](https://www.linkedin.com/in/parloti/)\n- [Open an issue](https://github.com/parloti/ngrx-set/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparloti%2Fngrx-set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparloti%2Fngrx-set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparloti%2Fngrx-set/lists"}