inferred-types 0.33.0 → 0.33.1
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
|
@@ -262,7 +262,7 @@ declare type IfBooleanLiteral<T extends boolean, IF, ELSE> = IsBooleanLiteral<T>
|
|
|
262
262
|
* Type utility which returns true/false if the string a _string literal_ versus
|
|
263
263
|
* just the _string_ type.
|
|
264
264
|
*/
|
|
265
|
-
declare type IsStringLiteral<T extends string
|
|
265
|
+
declare type IsStringLiteral<T> = T extends string ? string extends T ? false : true : false;
|
|
266
266
|
/**
|
|
267
267
|
* **IfStringLiteral**
|
|
268
268
|
*
|
package/package.json
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* Type utility which returns true/false if the string a _string literal_ versus
|
|
5
5
|
* just the _string_ type.
|
|
6
6
|
*/
|
|
7
|
-
export type IsStringLiteral<T
|
|
7
|
+
export type IsStringLiteral<T> = T extends string
|
|
8
|
+
? string extends T ? false : true
|
|
9
|
+
: false;
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* **IfStringLiteral**
|