0.1.0 • Published 2 months ago

ztsx v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

ztsx

This package is a type library for Typescript language and contains types like Pretiffy, ReverseArray, TitleString and more.

interface LongObject {
  tag: string
  children: LongObject[] | null
  props: Record<string, string | object | boolean | number> | null
  __key: number | string | null
  __safe: SAFE_SYMBOL
}

type Element = LongObject

When you will hover Element type, you just see interface LongObject instead of whole object.

You can solve this by just importing Prettify type.

import type { Prettify } from 'ztsx'

type Element = Prettify<LongObject>

And you will get this when hover:

{
  tag: string
  children: LongObject[] | null
  props: Record<string, string | object | boolean | number> | null
  __key: number | string | null
  __safe: SAFE_SYMBOL
}

It is more good when you are working with Typescript.

Installation

npm

npm install ztsx

pnpm

pnpm add ztsx

yarn

yarn add ztsx

bun

bun add ztsx

Usage

Import types from ztsx

import type { Result, Nullable } from 'ztsx'

Local Development

  • Clone repository git clone https://github.com/kadir62/ztsx

  • Install dependencies npm install

  • Create changes

  • Format code npm run format

  • Write version and Changelog

  • Check code npm run check

  • Publish commits

License

The MIT License (MIT)