ztsx
v0.1.0
Published
Type library for next-gen Typescript
Downloads
12
Maintainers
Readme
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