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.
npm install ztsx
pnpm add ztsx
yarn add ztsx
bun add ztsx
Import types from ztsx
import type { Result, Nullable } from 'ztsx'
-
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