tutils
/
6.0.0-alpha.10
tutils 6.0.0-alpha.10
Install from the command line:
Learn more about npm packages
$ npm install @flex-development/tutils@6.0.0-alpha.10
Install via package.json:
"@flex-development/tutils": "6.0.0-alpha.10"
About this version
TypeScript utilities.
This package contains a set of general TypeScript utilities. It includes enums, interfaces, types, and type guards.
TODO: when should i use this?
yarn add @flex-development/tutils
From Git:
yarn add @flex-development/tutils@flex-development/tutils
See Git - Protocols | Yarn for details on requesting a specific branch, commit, or tag.
import type { Nullable, Path } from '@flex-development/tutils'
/**
* Object representing a `User` entity **(from the database)**.
*
* **Does not include any [virtual fields][1]**.
*
* [1]: https://sequelize.org/v7/manual/getters-setters-virtuals#virtual-fields
*/
interface IUser {
created_at: number
email: Lowercase<string>
id: number
name: { first: Nullable<string>; last: Nullable<string> }
updated_at: Nullable<number>
}
/** {@linkcode IUser} attributes. */
type UserAttribute = Path<IUser> // 'created_at' | 'email' | 'id' | 'name' | 'name.first' | 'name.last' | 'updated_at'
export type { IUser as default, UserAttribute }
-
pkg-types
- TypeScript definitions forpackage.json
-
tsconfig-types
- TypeScript definitions fortsconfig.json
Details
- tutils
- flex-development
- almost 2 years ago
- BSD-3-Clause
- 81 dependencies
Assets
- tutils-6.0.0-alpha.10.tgz
Download activity
- Total downloads 17,047
- Last 30 days 707
- Last week 224
- Today 30