inferred-types 0.33.3 → 0.33.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -277,10 +277,10 @@ type Narrowable = string | number | boolean | symbol | object | undefined | void
|
|
|
277
277
|
*/
|
|
278
278
|
type IsUndefined<T extends Narrowable> = T extends undefined ? true : false;
|
|
279
279
|
/**
|
|
280
|
-
* **IfUndefined
|
|
280
|
+
* **IfUndefined**`<T, IF, ELSE>`
|
|
281
281
|
*
|
|
282
|
-
*
|
|
283
|
-
* otherwise returns `ELSE` type
|
|
282
|
+
* Type utility which returns `IF` type when `T` is an _undefined_
|
|
283
|
+
* otherwise returns `ELSE` type.
|
|
284
284
|
*/
|
|
285
285
|
type IfUndefined<T, IF, ELSE> = IsUndefined<T> extends true ? IF : ELSE;
|
|
286
286
|
|
package/package.json
CHANGED
|
@@ -8,9 +8,9 @@ import { Narrowable } from "../Narrowable";
|
|
|
8
8
|
export type IsUndefined<T extends Narrowable> = T extends undefined ? true : false;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* **IfUndefined
|
|
11
|
+
* **IfUndefined**`<T, IF, ELSE>`
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* otherwise returns `ELSE` type
|
|
13
|
+
* Type utility which returns `IF` type when `T` is an _undefined_
|
|
14
|
+
* otherwise returns `ELSE` type.
|
|
15
15
|
*/
|
|
16
16
|
export type IfUndefined<T, IF, ELSE> = IsUndefined<T> extends true ? IF : ELSE;
|