@culur/types
v1.2.0
Published
A collection of essential TypeScript types
Downloads
259
Readme
@culur/types
A collection of essential TypeScript types.
✨ Features
| Name | Type | Description |
| -------------- | ---------- | ----------------------------------------------------------- |
| defineObject
| function
| Define the actual object. |
| entries
| function
| Object.entries()
functions with types from type-fest
. |
| keys
| function
| Object.keys()
function with types from type-fest
. |
| PackageJson
| type
| PackageJson
from type-fest
and extends some custom type |
💿 Installation
Add @culur/types
dependency to your project.
# Using npm
npm install @culur/types
# Using pnpm
pnpm install @culur/types
# Using yarn
yarn add @culur/types
If you don't use any function in this lib, you can install it as devDependencies.
📖 Usage
import { defineObject } from '@culur/types';
const object = defineObject<{
foo?: string | number;
bar?: boolean;
}>()({
foo: 'foo',
});
// => { foo: string }
🗃️ Changelog
See CHANGELOG for more information on what has changed recently.
🔒 License
See LICENSE for license rights and limitations (MIT).