{"id":15819538,"url":"https://github.com/xunnamius/typescript-utils","last_synced_at":"2026-03-02T03:34:26.276Z","repository":{"id":37043905,"uuid":"361160018","full_name":"Xunnamius/typescript-utils","owner":"Xunnamius","description":"🆎 Various constants, utility types, and typed functions for improved TypeScript DX","archived":false,"fork":false,"pushed_at":"2024-08-28T00:10:18.000Z","size":2628,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T22:37:21.208Z","etag":null,"topics":["ergodark","helper","next","ts","type","types","typescript","utility","xunnamius"],"latest_commit_sha":null,"homepage":"https://npm.im/@-xun/types","language":"JavaScript","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/Xunnamius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-24T12:47:01.000Z","updated_at":"2024-08-28T00:19:10.000Z","dependencies_parsed_at":"2024-08-26T06:08:17.057Z","dependency_job_id":"d5fb43e8-6450-446f-be2a-2a82df64c4a6","html_url":"https://github.com/Xunnamius/typescript-utils","commit_stats":{"total_commits":170,"total_committers":2,"mean_commits":85.0,"dds":0.01764705882352946,"last_synced_commit":"ac3d48dd5ba103250abe8130901997c0e07bdc36"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xunnamius%2Ftypescript-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xunnamius%2Ftypescript-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xunnamius%2Ftypescript-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xunnamius%2Ftypescript-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xunnamius","download_url":"https://codeload.github.com/Xunnamius/typescript-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234883314,"owners_count":18901366,"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":["ergodark","helper","next","ts","type","types","typescript","utility","xunnamius"],"created_at":"2024-10-05T06:41:37.195Z","updated_at":"2025-10-01T17:30:52.620Z","avatar_url":"https://github.com/Xunnamius.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Xunnamius"],"categories":[],"sub_categories":[],"readme":"\u003c!-- symbiote-template-region-start 1 --\u003e\n\n\u003cp align=\"center\" width=\"100%\"\u003e\n  \u003cimg width=\"300\" src=\"https://raw.githubusercontent.com/Xunnamius/typescript-utils/refs/heads/main/logo.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003c!-- symbiote-template-region-end --\u003e\nVarious little things for improved TypeScript DX\n\u003c!-- symbiote-template-region-start 2 --\u003e\n\u003c/p\u003e\n\n\u003chr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Black Lives Matter!][x-badge-blm-image]][x-badge-blm-link]\n[![Last commit timestamp][x-badge-lastcommit-image]][x-badge-repo-link]\n[![Codecov][x-badge-codecov-image]][x-badge-codecov-link]\n[![Source license][x-badge-license-image]][x-badge-license-link]\n[![Uses Semantic Release!][x-badge-semanticrelease-image]][x-badge-semanticrelease-link]\n\n[![NPM version][x-badge-npm-image]][x-badge-npm-link]\n[![Monthly Downloads][x-badge-downloads-image]][x-badge-downloads-link]\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n# typescript-utils (@-xun/types)\n\n\u003c!-- symbiote-template-region-end --\u003e\n\nVarious little things for improved TypeScript DX.\n\n\u003c!-- symbiote-template-region-start 3 --\u003e\n\n---\n\n\u003c!-- remark-ignore-start --\u003e\n\u003c!-- symbiote-template-region-end --\u003e\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Install](#install)\n- [Usage](#usage)\n- [Appendix](#appendix)\n  - [Published Package Details](#published-package-details)\n  - [License](#license)\n- [Contributing and Support](#contributing-and-support)\n  - [Contributors](#contributors)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- symbiote-template-region-start 4 --\u003e\n\u003c!-- remark-ignore-end --\u003e\n\n\u003cbr /\u003e\n\n## Install\n\n\u003c!-- symbiote-template-region-end --\u003e\n\nTo install:\n\n```shell\nnpm install @-xun/types\n```\n\n## Usage\n\nYou can use this library's exports in your TypeScript projects like so:\n\n```typescript\nimport type { HttpStatusCode } from '@-xun/types';\n\nconst status: HttpStatusCode = 404;\n```\n\nFor a list of available types, see the [`docs`][x-repo-docs].\n\n\u003c!-- symbiote-template-region-start 5 --\u003e\n\n## Appendix\n\n\u003c!-- symbiote-template-region-end --\u003e\n\u003c!-- TODO: additional appendix sections here --\u003e\n\u003c!-- symbiote-template-region-start 6 --\u003e\n\n### Published Package Details\n\nThis is a [CJS2 package][x-pkg-cjs-mojito] with statically-analyzable exports\nbuilt by Babel for use in Node.js versions that are not end-of-life. For\nTypeScript users, this package supports both `\"Node10\"` and `\"Node16\"` module\nresolution strategies.\n\n\u003c!-- symbiote-template-region-end --\u003e\n\u003c!-- TODO: additional package details here --\u003e\n\u003c!-- symbiote-template-region-start 7 --\u003e\n\n\u003cdetails\u003e\u003csummary\u003eExpand details\u003c/summary\u003e\n\nThat means both CJS2 (via `require(...)`) and ESM (via `import { ... } from ...`\nor `await import(...)`) source will load this package from the same entry points\nwhen using Node. This has several benefits, the foremost being: less code\nshipped/smaller package size, avoiding [dual package\nhazard][x-pkg-dual-package-hazard] entirely, distributables are not\npacked/bundled/uglified, a drastically less complex build process, and CJS\nconsumers aren't shafted.\n\nEach entry point (i.e. `ENTRY`) in [`package.json`'s\n`exports[ENTRY]`][x-repo-package-json] object includes one or more [export\nconditions][x-pkg-exports-conditions]. These entries may or may not include: an\n[`exports[ENTRY].types`][x-pkg-exports-types-key] condition pointing to a type\ndeclaration file for TypeScript and IDEs, a\n[`exports[ENTRY].module`][x-pkg-exports-module-key] condition pointing to\n(usually ESM) source for Webpack/Rollup, a `exports[ENTRY].node` and/or\n`exports[ENTRY].default` condition pointing to (usually CJS2) source for Node.js\n`require`/`import` and for browsers and other environments, and [other\nconditions][x-pkg-exports-conditions] not enumerated here. Check the\n[package.json][x-repo-package-json] file to see which export conditions are\nsupported.\n\nNote that, regardless of the [`{ \"type\": \"...\" }`][x-pkg-type] specified in\n[`package.json`][x-repo-package-json], any JavaScript files written in ESM\nsyntax (including distributables) will always have the `.mjs` extension. Note\nalso that [`package.json`][x-repo-package-json] may include the\n[`sideEffects`][x-pkg-side-effects-key] key, which is almost always `false` for\noptimal [tree shaking][x-pkg-tree-shaking] where appropriate.\n\n\u003c!-- symbiote-template-region-end --\u003e\n\u003c!-- TODO: additional package details here --\u003e\n\u003c!-- symbiote-template-region-start 8 --\u003e\n\n\u003c/details\u003e\n\n### License\n\n\u003c!-- symbiote-template-region-end --\u003e\n\nSee [LICENSE][x-repo-license].\n\n\u003c!-- TODO: additional license information and/or sections here --\u003e\n\u003c!-- symbiote-template-region-start 9 --\u003e\n\n## Contributing and Support\n\n**[New issues][x-repo-choose-new-issue] and [pull requests][x-repo-pr-compare]\nare always welcome and greatly appreciated! 🤩** Just as well, you can [star 🌟\nthis project][x-badge-repo-link] to let me know you found it useful! ✊🏿 Or [buy\nme a beer][x-repo-sponsor], I'd appreciate it. Thank you!\n\nSee [CONTRIBUTING.md][x-repo-contributing] and [SUPPORT.md][x-repo-support] for\nmore information.\n\n\u003c!-- symbiote-template-region-end --\u003e\n\u003c!-- TODO: additional contribution/support sections here --\u003e\n\u003c!-- symbiote-template-region-start 10 --\u003e\n\n### Contributors\n\n\u003c!-- symbiote-template-region-end --\u003e\n\u003c!-- symbiote-template-region-start root-package-only --\u003e\n\u003c!-- remark-ignore-start --\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\u003c!-- remark-ignore-end --\u003e\n\nThanks goes to these wonderful people ([emoji\nkey][x-repo-all-contributors-emojis]):\n\n\u003c!-- remark-ignore-start --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://xunn.io/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/656017?v=4?s=100\" width=\"100px;\" alt=\"Bernard\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBernard\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-Xunnamius\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"https://github.com/Xunnamius/typescript-utils/commits?author=Xunnamius\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/Xunnamius/typescript-utils/commits?author=Xunnamius\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-Xunnamius\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/Xunnamius/typescript-utils/commits?author=Xunnamius\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/Xunnamius/typescript-utils/pulls?q=is%3Apr+reviewed-by%3AXunnamius\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n  \u003ctfoot\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" size=\"13px\" colspan=\"7\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg\"\u003e\n          \u003ca href=\"https://all-contributors.js.org/docs/en/bot/usage\"\u003eAdd your contributions\u003c/a\u003e\n        \u003c/img\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tfoot\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\u003c!-- remark-ignore-end --\u003e\n\nThis project follows the [all-contributors][x-repo-all-contributors]\nspecification. Contributions of any kind welcome!\n\n\u003c!-- symbiote-template-region-end --\u003e\n\u003c!-- symbiote-template-region-start workspace-package-only --\u003e\n\u003c!-- (section elided by symbiote) --\u003e\n\u003c!-- symbiote-template-region-end --\u003e\n\n[x-badge-blm-image]: https://xunn.at/badge-blm 'Join the movement!'\n[x-badge-blm-link]: https://xunn.at/donate-blm\n[x-badge-codecov-image]:\n  https://img.shields.io/codecov/c/github/Xunnamius/typescript-utils/main?style=flat-square\u0026token=HWRIOBAAPW\u0026flag=package.main_root\n  'Is this package well-tested?'\n[x-badge-codecov-link]: https://codecov.io/gh/Xunnamius/typescript-utils\n[x-badge-downloads-image]:\n  https://img.shields.io/npm/dm/@-xun/types?style=flat-square\n  'Number of times this package has been downloaded per month'\n[x-badge-downloads-link]: https://npmtrends.com/@-xun/types\n[x-badge-lastcommit-image]:\n  https://img.shields.io/github/last-commit/Xunnamius/typescript-utils?style=flat-square\n  'Latest commit timestamp'\n[x-badge-license-image]:\n  https://img.shields.io/npm/l/@-xun/types?style=flat-square\n  \"This package's source license\"\n[x-badge-license-link]:\n  https://github.com/Xunnamius/typescript-utils/blob/main/LICENSE\n[x-badge-npm-image]:\n  https://xunn.at/npm-pkg-version/@-xun/types\n  'Install this package using npm or yarn!'\n[x-badge-npm-link]: https://npm.im/@-xun/types\n[x-badge-repo-link]: https://github.com/Xunnamius/typescript-utils\n[x-badge-semanticrelease-image]:\n  https://xunn.at/badge-semantic-release\n  'This repo practices continuous integration and deployment!'\n[x-badge-semanticrelease-link]:\n  https://github.com/semantic-release/semantic-release\n[x-pkg-cjs-mojito]:\n  https://dev.to/jakobjingleheimer/configuring-commonjs-es-modules-for-nodejs-12ed#publish-only-a-cjs-distribution-with-property-exports\n[x-pkg-dual-package-hazard]:\n  https://nodejs.org/api/packages.html#dual-package-hazard\n[x-pkg-exports-conditions]:\n  https://webpack.js.org/guides/package-exports#reference-syntax\n[x-pkg-exports-module-key]:\n  https://webpack.js.org/guides/package-exports#providing-commonjs-and-esm-version-stateless\n[x-pkg-exports-types-key]:\n  https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta#packagejson-exports-imports-and-self-referencing\n[x-pkg-side-effects-key]:\n  https://webpack.js.org/guides/tree-shaking#mark-the-file-as-side-effect-free\n[x-pkg-tree-shaking]: https://webpack.js.org/guides/tree-shaking\n[x-pkg-type]:\n  https://github.com/nodejs/node/blob/8d8e06a345043bec787e904edc9a2f5c5e9c275f/doc/api/packages.md#type\n[x-repo-all-contributors]: https://github.com/all-contributors/all-contributors\n[x-repo-all-contributors-emojis]: https://allcontributors.org/docs/en/emoji-key\n[x-repo-choose-new-issue]:\n  https://github.com/Xunnamius/typescript-utils/issues/new/choose\n[x-repo-contributing]: /CONTRIBUTING.md\n[x-repo-docs]: docs\n[x-repo-license]: ./LICENSE\n[x-repo-package-json]: package.json\n[x-repo-pr-compare]: https://github.com/Xunnamius/typescript-utils/compare\n[x-repo-sponsor]: https://github.com/sponsors/Xunnamius\n[x-repo-support]: /.github/SUPPORT.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxunnamius%2Ftypescript-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxunnamius%2Ftypescript-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxunnamius%2Ftypescript-utils/lists"}