Détail du package

@xunnamius/next-types

Xunnamius56MITobsolète1.0.9

This package has been superseded by @-xun/next and @-xun/react

Various constants, utility types, and typed functions for Next.js-based projects

type, types, typescript, ergodark

readme

![Black Lives Matter!][badge-blm] ![Maintenance status][badge-maintenance] ![Last commit timestamp][badge-last-commit] ![Open issues][badge-issues] ![Pull requests][badge-pulls] ![Codecov][badge-codecov] ![Source license][badge-license] [![Tree shaking support][badge-tree-shaking]][link-bundlephobia] [Compressed package size][link-bundlephobia] ![NPM version][badge-npm] ![Uses Semantic Release!][badge-semantic-release]

@xunnamius/next-types


This package contains several TypeScript utility types and helper functions for use with Next.js-based projects.

Install

npm install --save-dev @xunnamius/next-types

Usage

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

import type { NextApiHandler } from 'next';
import type { WithConfig } from '@xunnamius/next-types';

// ...

const handler: WithConfig<NextApiHandler> = getHandler();

Type and Constant Glossary

This package exports the following:

WithConfig

This type is used to show a NextPage or NextApiHandler exports a Config object.

import * as EndpointHandler from 'universe/pages/api/your-endpoint';
import type { WithConfig } from '@xunnamius/next-types';

const endpointHandler: WithConfig<typeof EndpointHandler.default> =
  EndpointHandler.default;
endpointHandler.config = EndpointHandler.config;

Function Glossary

The following functions are available: (none yet)

Documentation

Further documentation can be found under docs/.

License

[![FOSSA analysis][badge-fossa]][link-fossa]

Contributing and Support

[New issues][choose-new-issue] 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! ✊🏿 Thank you!

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

[badge-blm]: https://api.ergodark.com/badges/blm 'Join the movement!'

[badge-maintenance]: https://img.shields.io/maintenance/active/2022 'Is this package maintained?'

[badge-last-commit]: https://img.shields.io/github/last-commit/xunnamius/typescript-utils 'Latest commit timestamp' [badge-issues]: https://img.shields.io/github/issues/Xunnamius/typescript-utils 'Open issues'

[badge-pulls]: https://img.shields.io/github/issues-pr/xunnamius/typescript-utils 'Open pull requests'

[badge-codecov]: https://codecov.io/gh/Xunnamius/typescript-utils/branch/main/graph/badge.svg?token=HWRIOBAAPW 'Is this package well-tested?'

[badge-license]: https://img.shields.io/npm/l/@xunnamius/next-types "This package's source license"

[badge-fossa]: https://app.fossa.com/api/projects/custom%2B27276%2Fgit%40github.com%3AXunnamius%2Ftypescript-utils.git.svg?type=large "Analysis of this package's license obligations" [link-fossa]: https://app.fossa.com/projects/custom+27276%2Fgit@github.com:Xunnamius%2Ftypescript-utils.git [badge-npm]: https://api.ergodark.com/badges/npm-pkg-version/@xunnamius/next-types 'Install this package using npm or yarn!'

[badge-semantic-release]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg 'This repo practices continuous integration and deployment!'

[badge-tree-shaking]: https://badgen.net/bundlephobia/tree-shaking/@xunnamius/next-types 'Is this package optimized for Webpack?' [link-bundlephobia]: https://bundlephobia.com/result?p=@xunnamius/next-types 'Package size (minified and gzipped)'

[choose-new-issue]: https://github.com/xunnamius/typescript-utils/issues/new/choose