{"id":22184390,"url":"https://github.com/ksxnodemodules/typescript-miscellaneous","last_synced_at":"2025-07-26T19:31:20.722Z","repository":{"id":33088341,"uuid":"151393064","full_name":"ksxnodemodules/typescript-miscellaneous","owner":"ksxnodemodules","description":"Miscellaneous TypeScript utilities","archived":false,"fork":false,"pushed_at":"2023-03-17T03:14:31.000Z","size":129,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-27T19:05:14.778Z","etag":null,"topics":["library","miscellaneous","types","typescript","utility"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/typescript-miscellaneous","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/ksxnodemodules.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-03T10:02:47.000Z","updated_at":"2022-04-25T02:00:38.000Z","dependencies_parsed_at":"2023-01-14T23:18:47.685Z","dependency_job_id":null,"html_url":"https://github.com/ksxnodemodules/typescript-miscellaneous","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksxnodemodules%2Ftypescript-miscellaneous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksxnodemodules%2Ftypescript-miscellaneous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksxnodemodules%2Ftypescript-miscellaneous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksxnodemodules%2Ftypescript-miscellaneous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksxnodemodules","download_url":"https://codeload.github.com/ksxnodemodules/typescript-miscellaneous/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227707762,"owners_count":17807513,"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":["library","miscellaneous","types","typescript","utility"],"created_at":"2024-12-02T10:12:53.158Z","updated_at":"2024-12-02T10:12:53.936Z","avatar_url":"https://github.com/ksxnodemodules.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeScript Miscellaneous\n\n## Requirements\n\n* TypeScript ≥ 3.0.0\n\n## Usage\n\n### `Dict`\n\n**Without TypeScript Miscellaneous:**\n\n```typescript\ntype MyObj = {\n  a: number\n  b: number\n  c: number\n  0: number\n  1: number\n}\n```\n\n**With TypeScript Miscellaneous:**\n\n```typescript\nimport { Dict } from 'typescript-miscellaneous'\n\ntype MyObj = Dict\u003c\n  'a' | 'b' | 'c' | 0 | 1,\n  number\n\u003e\n```\n\n### `UnionToIntersection`\n\n```typescript\nimport { UnionToIntersection } from 'typescript-miscellaneous'\ntype Intersection = UnionToIntersection\u003c0 | 1 | 2\u003e // Expect: 0 \u0026 1 \u0026 2\n```\n\n### `ElementOf`\n\n```typescript\nimport { ElementOf } from 'typescript-miscellaneous'\ntype Element = ElementOf\u003c[0, 1, 2, 3]\u003e // Expect: 0 | 1 | 2 | 3\n```\n\n### `ParametersOf`\n\n```typescript\nimport { ParametersOf } from 'typescript-miscellaneous'\ntype Parameters = ParametersOf\u003c(a: 0, b: 1) =\u003e void\u003e // Expect: [0, 1]\n```\n\n### `ReturnOf`\n\n```typescript\nimport { ReturnOf } from 'typescript-miscellaneous'\ntype Return = ReturnOf\u003c() =\u003e 123\u003e // Expect: 123\n```\n\n## License\n\n[MIT](https://git.io/fxIAz) © [Hoàng Văn Khải](https://github.com/KSXGitHub)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksxnodemodules%2Ftypescript-miscellaneous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksxnodemodules%2Ftypescript-miscellaneous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksxnodemodules%2Ftypescript-miscellaneous/lists"}