types-ramda
Advanced tools
Comparing version 0.29.4 to 0.29.5
@@ -378,25 +378,2 @@ import { A, M } from 'ts-toolbelt'; | ||
/** | ||
* Takes a lists of arguments and returns either `true` or `false`. | ||
* | ||
* Classical predicates only take one argument, but since ramda | ||
* supports multiple arguments, we also use them like that. | ||
* | ||
* Note that these predicates, don't represent typeguards, | ||
* meaning when this type is used, we can't get type narrowing. | ||
* | ||
* @see {@link PredTypeguard} for the typeguard version of this. | ||
*/ | ||
export type Pred<T extends any[] = any[]> = (...a: T) => boolean; | ||
/** | ||
* Takes an argument and returns either `true` or `false`. | ||
* | ||
* This is usually used as an overload before {@link Pred}. | ||
* If you would this type alone, the function would **required** | ||
* to be a typeguard, meaning a simple function just returning | ||
* a `boolean` wouldn't satisfy this constrain. | ||
*/ | ||
export type PredTypeguard<T, TTypeguarded extends T> = (a: T) => a is TTypeguarded; | ||
/** | ||
* A runtime-branded value used to stop `reduce` and `transduce` early. | ||
@@ -527,1 +504,16 @@ * @param A The type of the contained value | ||
: T; | ||
/** | ||
* Extract the types from an array | ||
* Works with Tuples, eg `ElementOf<typeof ['p1', 'p2']>` => `'p1' | 'p2'` | ||
* | ||
* <created by @harris-miller> | ||
*/ | ||
export type ElementOf<Type extends readonly any[]> = Type extends readonly (infer Values)[] ? Values : never; | ||
/** | ||
* Convenance type function to extract keys of an object as a tuple literal | ||
* | ||
* <created by @harris-miller> | ||
*/ | ||
export type KeysAsTuple<T> = [keyof T, ...(keyof T)[]]; |
{ | ||
"name": "types-ramda", | ||
"version": "0.29.4", | ||
"version": "0.29.5", | ||
"description": "Dedicated types library for ramda", | ||
@@ -54,12 +54,12 @@ "author": "Harris Miller <harrismillerconsulting@gmail.com>", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.60.1", | ||
"@typescript-eslint/parser": "^5.60.1", | ||
"@typescript-eslint/eslint-plugin": "^6.7.4", | ||
"@typescript-eslint/parser": "^6.7.4", | ||
"dox": "^1.0.0", | ||
"eslint": "^8.43.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint": "^8.50.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"ramda": "^0.29.0", | ||
"tsd": "^0.28.1", | ||
"typescript": "^5.1.6", | ||
"tsd": "^0.29.0", | ||
"typescript": "^5.2.2", | ||
"xyz": "^4.0.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
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
246590
6710