Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

types-ramda

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

types-ramda - npm Package Compare versions

Comparing version 0.29.2 to 0.29.3

48

es/tools.d.ts

@@ -34,2 +34,8 @@ import { A, M } from 'ts-toolbelt';

/**
* A conditional type to use with default values. (defaultTo, propOr, etc)
* <created by @lax4mike>
*/
export type DefaultTo<Fallback, Value> = (Value extends (null | undefined) ? Fallback | Exclude<Value, null | undefined> : Value);
/**
* Represents all objects evolvable with Evolver E

@@ -106,2 +112,16 @@ * @param E

/**
* A Functor - a simple type representing a Functor that used `map` is the method prop name
*/
export type FunctorMap<A> = {
map<B>(fn: (a: A) => B): FunctorMap<B>;
};
/**
* A FantasyLand Functor - a simple type representing a Functor wiih the fantasy-land specific prop name
*/
export type FunctorFantasyLand<A> = {
['fantasy-land/map']<B>(fn: (a: A) => B): FunctorFantasyLand<B>;
};
/**
* R.any dispatches to `.any` of the second argument, if present.

@@ -340,3 +360,3 @@ * This type infers the type of the first argument of that method and returns it

// https://github.com/piotrwitek/utility-types/blob/df2502ef504c4ba8bd9de81a45baef112b7921d0/src/mapped-types.ts#L351-L362
export type ObjectHavingSome<Key extends string> = {
export type ObjectHavingSome<Key extends PropertyKey> = {
[K in Key]: { [P in K]: unknown };

@@ -420,2 +440,8 @@ }[Key];

/**
* When you have a union type, `keyof T` is not sufficient
* <created by @harris-miller>
*/
export type KeysOfUnion<T> = T extends infer U ? keyof U : never;
/**
* If `T` is a union, `T[keyof T]` (cf. `map` and `values` in `index.d.ts`) contains the types of object values that are common across the union (i.e., an intersection).

@@ -492,2 +518,22 @@ * Because we want to include the types of all values, including those that occur in some, but not all members of the union, we first define `ValueOfUnion`.

/**
* When you have `gt = <T extends Ord>(a: T, b: T) => boolean`, `a` and `b` are different strings, and `T` defaults to `string
* However, `gt = <T extends Ord>(a: T) => (b: T) => boolean`, because `a` is evaluated without `b`, `T` is the literal of `a`
* `WidenLiteral` exists to go from a literal type to its base type, eg
* * `"foobar"` -> `string`
* * `1` -> `number`
* * `true` -> `boolean
* @see https://stackoverflow.com/a/56333836/10107466
*
* <created by @harris-miller>
*/
export type WidenLiterals<T> =
T extends boolean
? boolean
: T extends string
? string
: T extends number
? number
: T;
/**
* Recursively Update a deep property from a given path

@@ -494,0 +540,0 @@ *

2

package.json
{
"name": "types-ramda",
"version": "0.29.2",
"version": "0.29.3",
"description": "Dedicated types library for ramda",

@@ -5,0 +5,0 @@ "author": "Harris Miller <harrismillerconsulting@gmail.com>",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc