Skip to content

EzioMercer/type-enhancers

Repository files navigation

type-enhancers

Installing

npm i -d type-enhancers

How to use

Utils

To use utils, you have to import them in every file with named import from utils folder:

Import from utils folder

import type { Nilable, Nullable } from "type-enhancers/utils";

Import directly from utils files

import type { Nilable } from "type-enhancers/utils/Nilable";
import type { Nullable } from "type-enhancers/utils/Nullable";

Overloads

To use overloads, you have to import them in one file from overloads folder. You can control the scope of overloads just from your import:

Import all overloads:

import "type-enhancers/overloads";

Import all overloads for String:

import "type-enhancers/overloads/String";

Import all overloads for the String split method:

import "type-enhancers/overloads/String/Split";

Available overloads

Available utils