23.0.30 • Published 4 months ago

@nxtedition/types v23.0.30

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

@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.

23.0.4

8 months ago

23.0.3

9 months ago

23.0.6

8 months ago

23.0.5

8 months ago

23.0.8

8 months ago

23.0.7

8 months ago

23.0.9

8 months ago

23.0.30

4 months ago

23.0.2

9 months ago

23.0.1

10 months ago

22.2.1

10 months ago

23.0.21

6 months ago

23.0.22

6 months ago

23.0.20

7 months ago

23.0.25

5 months ago

23.0.26

5 months ago

23.0.23

6 months ago

23.0.24

6 months ago

23.0.27

5 months ago

23.0.28

4 months ago

1.6.14

11 months ago

23.0.10

8 months ago

23.0.11

8 months ago

23.0.14

7 months ago

23.0.15

7 months ago

23.0.12

8 months ago

23.0.13

7 months ago

23.0.18

7 months ago

23.0.19

7 months ago

23.0.16

7 months ago

23.0.17

7 months ago

1.6.13

12 months ago

1.6.12

12 months ago

1.6.11

12 months ago

1.6.10

12 months ago

1.6.9

1 year ago

1.6.8

1 year ago

1.6.7

1 year ago

1.6.6

1 year ago

1.6.4

1 year ago

1.6.3

1 year ago

1.6.2

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago