diff --git a/source/Falsy.d.ts b/source/Falsy.d.ts deleted file mode 100644 index ecb62f3..0000000 --- a/source/Falsy.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type Falsy = false | '' | 0 | null | undefined; diff --git a/source/basic/Falsy.d.ts b/source/basic/Falsy.d.ts new file mode 100644 index 0000000..c99517d --- /dev/null +++ b/source/basic/Falsy.d.ts @@ -0,0 +1,17 @@ +/** + * A type representing all the values that are considered falsy in JavaScript. + * + * In JavaScript, falsy values are those that evaluate to `false` in a Boolean context. + * This type includes: + * + * - `false` : The Boolean false value. + * - `''` : An empty string. + * - `0`: The number zero. + * - `null`: The null value representing the absence of any value. + * - `undefined`: A value that indicates a variable has not been assigned a value. + * + * This type can be useful for defining variables, parameters, or return types that + * should only accept or return falsy values. + */ + +export type Falsy = false | '' | 0 | null | undefined; diff --git a/source/Primitive.d.ts b/source/basic/Primitive.d.ts similarity index 100% rename from source/Primitive.d.ts rename to source/basic/Primitive.d.ts diff --git a/source/basic/index.d.ts b/source/basic/index.d.ts new file mode 100644 index 0000000..f02ac4e --- /dev/null +++ b/source/basic/index.d.ts @@ -0,0 +1,2 @@ +export type { Falsy } from './Falsy'; +export type { Primitive } from './Primitive'; diff --git a/source/index.d.ts b/source/index.d.ts new file mode 100644 index 0000000..9444bcd --- /dev/null +++ b/source/index.d.ts @@ -0,0 +1 @@ +export * from './basic';