extra-utils
Advanced tools
Comparing version 5.5.0 to 5.5.1
@@ -1,3 +0,3 @@ | ||
export declare function enumEntries<T extends Record<string | number, string | number>>(_enum: T): Array<{ | ||
export declare function enumEntries<T extends Record<string, string | number>>(_enum: T): Array<{ | ||
[Key in keyof T]: [Key, T[Key]]; | ||
}[keyof T]>; |
@@ -1,1 +0,1 @@ | ||
export declare function enumKeys<T extends Record<string | number, string | number>>(_enum: T): Array<keyof T>; | ||
export declare function enumKeys<T extends Record<string, string | number>>(_enum: T): Array<keyof T>; |
@@ -1,1 +0,1 @@ | ||
export declare function enumValues<T extends Record<string | number, string | number>>(_enum: T): Array<T[keyof T]>; | ||
export declare function enumValues<T extends Record<string, string | number>>(_enum: T): Array<T[keyof T]>; |
@@ -1,2 +0,2 @@ | ||
export declare function inEnum<T extends Record<string | number, string | number>>(val: string | number, _enum: T): val is T[keyof T]; | ||
export declare function notInEnum(val: string | number, _enum: Record<string | number, string | number>): boolean; | ||
export declare function inEnum<T extends Record<string, string | number>>(val: string | number, _enum: T): val is T[keyof T]; | ||
export declare function notInEnum(val: string | number, _enum: Record<string, string | number>): boolean; |
{ | ||
"name": "extra-utils", | ||
"version": "5.5.0", | ||
"version": "5.5.1", | ||
"description": "Utilities for JavaScript and Typescript", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -194,3 +194,3 @@ # extra-utils | ||
```ts | ||
function inEnum<T extends Record<string | number, string | number>>( | ||
function inEnum<T extends Record<string, string | number>>( | ||
val: string | number | ||
@@ -201,12 +201,12 @@ , _enum: T | ||
val: string | number | ||
, _enum: Record<string | number, string | number> | ||
, _enum: Record<string, string | number> | ||
): boolean | ||
function enumKeys<T extends Record<string | number, string | number>>( | ||
function enumKeys<T extends Record<string, string | number>>( | ||
_enum: T | ||
): Array<keyof T> | ||
function enumValues<T extends Record<string | number, string | number>>( | ||
function enumValues<T extends Record<string, string | number>>( | ||
_enum: T | ||
): Array<T[keyof T]> | ||
function enumEntries<T extends Record<string | number, string | number>>( | ||
function enumEntries<T extends Record<string, string | number>>( | ||
_enum: T | ||
@@ -213,0 +213,0 @@ ): Array<{ [Key in keyof T]: [Key, T[Key]] }[keyof T]> |
import { enumKeys } from './enum-keys.js' | ||
export function enumEntries<T extends Record<string | number, string | number>>( | ||
export function enumEntries<T extends Record<string, string | number>>( | ||
_enum: T | ||
@@ -5,0 +5,0 @@ ): Array<{ [Key in keyof T]: [Key, T[Key]] }[keyof T]> { |
@@ -1,2 +0,2 @@ | ||
export function enumKeys<T extends Record<string | number, string | number>>( | ||
export function enumKeys<T extends Record<string, string | number>>( | ||
_enum: T | ||
@@ -3,0 +3,0 @@ ): Array<keyof T> { |
import { enumKeys } from './enum-keys.js' | ||
export function enumValues<T extends Record<string | number, string | number>>( | ||
export function enumValues<T extends Record<string, string | number>>( | ||
_enum: T | ||
@@ -5,0 +5,0 @@ ): Array<T[keyof T]> { |
import { enumValues } from './enum-values.js' | ||
export function inEnum<T extends Record<string | number, string | number>>( | ||
export function inEnum<T extends Record<string, string | number>>( | ||
val: string | number | ||
@@ -13,5 +13,5 @@ , _enum: T | ||
val: string | number | ||
, _enum: Record<string | number, string | number> | ||
, _enum: Record<string, string | number> | ||
): boolean { | ||
return !inEnum(val, _enum) | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65573