🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@nxtedition/types

Package Overview
Dependencies
Maintainers
12
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nxtedition/types

TypeScript types to be shared between nxtedition packages.

latest
npmnpm
Version
23.1.20
Version published
Weekly downloads
284
-22.19%
Maintainers
12
Weekly downloads
 
Created
Source

@nxtedition/types

Description

This package contains:

  • TypeScript types to be shared between nxtedition packages.
  • Runtime validatiors and JSON functions for those types.

Usage

Import types and validators like this in TypeScript:

import type { TemplateRecord } from '@nxtedition/types'
import { isTemplateRecord } from '@nxtedition/types'

const templateRecord: TemplateRecord = { ... }


And like this in JavaScript:

```javascript
import { isTemplateRecord } from '@nxtedition/types'

/**
 * @typedef { import("@nxtedition/types").TemplateRecord } TemplateRecord
 */

/** @type {TemplateRecord} */
const templateRecord = { ... }

If bundle size is an issue, you can import only the parts you need like this:

import { isTemplateRecord } from '@nxtedition/types/domains/template'

Development

Generate runtime code

Generally, we only manually specify types in this package. A code generator is used to generate the runtime validators and JSON functions. It will do so for all types that are exported. To run the generator, use the following command:

yarn build

This will build the output to the dist directory.

Exports

We export all types up to the root of the package, so they can be imported directly from @nxtedition/types. This means that all exported types must be uniquely named.

FAQs

Package last updated on 30 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts