0.0.3 • Published 5 months ago

@13onthecode/types v0.0.3

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

@13OnTheCode/Types

Version License

English | 简体中文

A collection of TypeScript utility types

Prerequisites

TypeScript

  • Version >= 5.0.0

Install

npm install @13onthecode/types --save-dev

Usage

import type { MergeObject } from '@13onthecode/types'

type Foo = {
  foo: 'foo'
  other: {
    foo: 'foo'
  }
}

type Bar = {
  bar: 'bar'
  other: {
    bar: 'bar'
  }
}

type Merged = MergeObject<Foo, Bar>
// => {
//   foo: "foo"
//   bar: "bar"
//   other: {
//       bar: 'bar'
//   }
// }

type DeepMerged = MergeObject<Foo, Bar, { mode: 'deep' }>
// => {
//   foo: "foo"
//   bar: "bar"
//   other: {
//       foo: "foo"
//       bar: "bar"
//   }
// }

API

Array

Base

Guard

Map

Object

Set

String

Utils

Check Also

License

MIT License © 2023-PRESENT 13OnTheCode

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago