0.1.0 • Published 2 years ago
ztsx v0.1.0
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 = LongObjectWhen 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 ztsxpnpm
pnpm add ztsxyarn
yarn add ztsxbun
bun add ztsxUsage
Import types from ztsx
import type { Result, Nullable } from 'ztsx'Local Development
Clone repository
git clone https://github.com/kadir62/ztsxInstall dependencies
npm installCreate changes
Format code
npm run formatWrite version and Changelog
Check code
npm run checkPublish commits
License
0.1.0
2 years ago