Catalog npm
Back to packageRELEASE DETAILS

1.1.0

npm

@-xun/types

Various little things for improved TypeScript DX

Published2 Jun 2025
Direct dependencies1
Transitive dependenciesNot calculated

README

Current package documentation

Various little things for improved TypeScript DX


Black Lives Matter! Last commit timestamp Codecov Source license Uses Semantic Release!

NPM version Monthly Downloads


typescript-utils (@-xun/types)

Various little things for improved TypeScript DX.



Install

To install:

npm install @-xun/types

Usage

You can use this library's exports in your TypeScript projects like so:

import type { HttpStatusCode } from '@-xun/types';

const status: HttpStatusCode = 404;

For a list of available types, see the docs.

Appendix

Published Package Details

This is a CJS2 package with statically-analyzable exports built by Babel for use in Node.js versions that are not end-of-life. For TypeScript users, this package supports both "Node10" and "Node16" module resolution strategies.

Expand details

That means both CJS2 (via require(...)) and ESM (via import { ... } from ... or await import(...)) source will load this package from the same entry points when using Node. This has several benefits, the foremost being: less code shipped/smaller package size, avoiding dual package hazard entirely, distributables are not packed/bundled/uglified, a drastically less complex build process, and CJS consumers aren't shafted.

Each entry point (i.e. ENTRY) in package.json's exports[ENTRY] object includes one or more export conditions. These entries may or may not include: an exports[ENTRY].types condition pointing to a type declaration file for TypeScript and IDEs, a exports[ENTRY].module condition pointing to (usually ESM) source for Webpack/Rollup, a exports[ENTRY].node and/or exports[ENTRY].default condition pointing to (usually CJS2) source for Node.js require/import and for browsers and other environments, and other conditions not enumerated here. Check the package.json file to see which export conditions are supported.

Note that, regardless of the { "type": "..." } specified in package.json, any JavaScript files written in ESM syntax (including distributables) will always have the .mjs extension. Note also that package.json may include the sideEffects key, which is almost always false for optimal tree shaking where appropriate.

License

See LICENSE.

Contributing and Support

New issues and pull requests are always welcome and greatly appreciated! 🤩 Just as well, you can star 🌟 this project to let me know you found it useful! ✊🏿 Or buy me a beer, I'd appreciate it. Thank you!

See CONTRIBUTING.md and SUPPORT.md for more information.

Contributors

All Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@-xun/symbiote
Environment
{
  "local_name": "@-xun/symbiote",
  "alias": false,
  "peer_metadata": null
}
^4.2.3development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "3d09ce6ff408dfb6341485da232f23b9b180656b",
  "tarball": "https://registry.npmjs.org/@-xun/types/-/types-1.1.0.tgz",
  "fileCount": 5,
  "integrity": "sha512-F2OQQUld6lLfycPbXACtY+OHUU3Bfe8GH00WcqTDMIHTAm1S2t5NZIQjIECFaiaTplGmaJOsQB0qxZ86ood19Q==",
  "signatures": [
    {
      "sig": "MEQCIAn5tGjuXlpYwv5vwnL2F+E29ECEIsFrsCbB04jM/xgnAiA0fbjz1NP9O2mwz0vcwXgq1yyduOeqJuawswAx3gqw8w==",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 17046
}

Repository

PENDING
xunnamius/typescript-utils

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:53 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:0b45fa28bd5c8cb2f4164df8195ad3a68bcb516eafbc16af9fe5dd58c2f3ce2f

Other collected versions

1.3.024 Aug1.2.014 Jul1.0.01 JunView all collected versions →