{"id":16368749,"url":"https://github.com/aigoncharov/types-redux-orm","last_synced_at":"2025-06-12T04:05:45.164Z","repository":{"id":57383724,"uuid":"109722252","full_name":"aigoncharov/types-redux-orm","owner":"aigoncharov","description":"Typescript types for redux-orm","archived":false,"fork":false,"pushed_at":"2018-06-26T00:06:39.000Z","size":11,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T20:46:45.556Z","etag":null,"topics":["redux-orm","typescript","typescript-typings","typings"],"latest_commit_sha":null,"homepage":null,"language":null,"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/aigoncharov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-06T16:43:31.000Z","updated_at":"2021-07-30T08:06:04.000Z","dependencies_parsed_at":"2022-09-14T00:52:30.648Z","dependency_job_id":null,"html_url":"https://github.com/aigoncharov/types-redux-orm","commit_stats":null,"previous_names":["keenondrums/types-redux-orm"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/aigoncharov/types-redux-orm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aigoncharov%2Ftypes-redux-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aigoncharov%2Ftypes-redux-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aigoncharov%2Ftypes-redux-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aigoncharov%2Ftypes-redux-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aigoncharov","download_url":"https://codeload.github.com/aigoncharov/types-redux-orm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aigoncharov%2Ftypes-redux-orm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259394802,"owners_count":22850804,"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":["redux-orm","typescript","typescript-typings","typings"],"created_at":"2024-10-11T02:53:41.109Z","updated_at":"2025-06-12T04:05:45.108Z","avatar_url":"https://github.com/aigoncharov.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# types-redux-orm\n## NO LONGER SUPPORTED. USE [@types/redux-orm](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-orm) \n\nTypescript types for [Redux Orm 0.9.4](https://github.com/tommikaikkonen/redux-orm)\n\n## Important\n\nIt's an alpha version of types I currently use in one of my projects. They will be updated as I proceed with the project. No backward compatibility guaranteed.\n\n## Roadmap\n\n01/13/18 - Beta release    \n02/03/18 - Stable release and merge into [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped)\n\n## Install\n\n```\nnpm install types-redux-orm\n```\n\nModify your tsconfig.json as following:\n\n```\n...\n\"typeRoots\": [\n      \"./node_modules/types-redux-orm\",\n      \"./node_modules/@types\"\n    ],\n...\n```\n\n## Recipes\n\n### Model\n\n```javascript\nimport { attr, IORMCommonState, IORMId, ITableState, Model, ORM } from 'redux-orm'\n\nexport class Test extends Model\u003cITestStateItem, IFetchIndicatorState\u003e {\n  static modelName = 'Test'\n\n  static fields = {\n    test: attr(),\n    isFetching: attr({ getDefault: () =\u003e false }),\n    id: attr()\n  }\n}\n\n// core data which we do not have defaults for\nexport interface ITestStateItem {\n  test: string\n}\n\n// optional data we provide defaults for\nexport interface IFetchIndicatorState {\n  isFetching: boolean\n}\n\n// id attr is added automatically by redux-orm therefore we have IORMId interface\nexport type ITestState = ITableState\u003cITestStateItem \u0026 IORMId \u0026 IFetchIndicatorState\u003e\n\nexport interface ITestORMState extends IORMCommonState {\n  Test: ITestState\n}\n\ninterface ITestORMModels {\n  Test: typeof Test\n}\n\nconst orm = new ORM\u003cITestORMState\u003e()\norm.register\u003cITestORMModels\u003e(Test)\nexport default orm\n```\n\n### Reducer\n\n```javascript\ninterface ITestDTO {\n  test: string\n}\n\nconst reducerAddItem = (state: ITestORMState, action: ActionMeta\u003cITestDTO, any\u003e): ITestORMState =\u003e {\n  const session = orm.session(state)\n  session.Test.upsert\u003cITestStateItem\u003e(action.payload)\n  return session.state\n}\n```\n\n### Selector\n\n```javascript\nimport { createSelector as createSelectorORM, IORMId, ISession } from 'redux-orm'\n\ninterface ITestDisplayItem {\n  test: string\n}\ntype ITestDisplayItemList = ITestDisplayItem[]\n\nexport const makeGetTestDisplayList = () =\u003e {\n  const ormSelector = createSelectorORM\u003cITestORMState\u003e(orm, (session: ISession\u003cITestORMState\u003e) =\u003e\n    session.Test\n      .all\u003cITestStateItem, IFetchIndicatorState\u003e()\n      .toRefArray()\n      .map((item) =\u003e ({ ...item }))\n  })\n  return createSelector\u003cIRootState, ITestORMState, ITestDisplayItemList\u003e(\n    ({ test }) =\u003e test,\n    ormSelector\n  )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faigoncharov%2Ftypes-redux-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faigoncharov%2Ftypes-redux-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faigoncharov%2Ftypes-redux-orm/lists"}