TypeScript utilities.
yarn add @flex-development/tutilsTo install from the GitHub Package Registry, setup a .npmrc or .yarnrc.yml file to authenticate with the registry. A Personal Access Token with at least the read:packages scope is required.
//npm.pkg.github.com/:_authToken=${GH_PAT} @flex-development:registry=https://npm.pkg.github.com/ npmRegistries: //npm.pkg.github.com: npmAlwaysAuth: true npmAuthToken: ${GH_PAT} npmScopes: flex-development: npmRegistryServer: https://npm.pkg.github.comFor details on requesting a specific branch, commit, or tag, see npm-install or Git - Protocols | Yarn.
npm i flex-development/tutilsyarn add @flex-development/tutils@flex-development/tutilsimport type { NullishNumber, NullishString, OrNull, 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 IUserRaw { created_at: number email: Lowercase<string> id: number name: { first: NullishString; last: NullishString } updated_at: NullishNumber } /** {@link IUserRaw} attributes. */ type UserRawAttribute = Path<IUserRaw> // 'created_at' | 'email' | 'id' | 'name' | 'name.first' | 'name.last' | 'updated_at' export { type IUserRaw as default, type UserRawAttribute }- Enums:
src/enums - Type Definitions:
src/types - Type Guards:
src/guards