Socket
Socket
Sign inDemoInstall

type-fest

Package Overview
Dependencies
0
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.5.7 to 3.6.0

source/writable-deep.d.ts

1

index.d.ts

@@ -11,2 +11,3 @@ // Basic

export type {Writable} from './source/writable';
export type {WritableDeep} from './source/writable-deep';
export type {Merge} from './source/merge';

@@ -13,0 +14,0 @@ export type {MergeDeep, MergeDeepOptions} from './source/merge-deep';

2

package.json
{
"name": "type-fest",
"version": "3.5.7",
"version": "3.6.0",
"description": "A collection of essential TypeScript types",

@@ -5,0 +5,0 @@ "license": "(MIT OR CC0-1.0)",

@@ -132,2 +132,3 @@ <div align="center">

- [`Writable`](source/writable.d.ts) - Create a type that strips `readonly` from all or some of an object's keys. The inverse of `Readonly<T>`.
- [`WritableDeep`](source/writable-deep.d.ts) - Create a deeply mutable version of an `object`/`ReadonlyMap`/`ReadonlySet`/`ReadonlyArray` type. The inverse of `ReadonlyDeep<T>`. Use `Writable<T>` if you only need one level deep.
- [`Merge`](source/merge.d.ts) - Merge two types into a new type. Keys of the second type overrides keys of the first type.

@@ -134,0 +135,0 @@ - [`MergeDeep`](source/merge-deep.d.ts) - Merge two objects or two arrays/tuples recursively into a new type.

@@ -245,1 +245,16 @@ import type {Primitive} from './primitive';

>;
/**
Test if the given function has multiple call signatures.
Needed to handle the case of a single call signature with properties.
Multiple call signatures cannot currently be supported due to a TypeScript limitation.
@see https://github.com/microsoft/TypeScript/issues/29732
*/
export type HasMultipleCallSignatures<T extends (...arguments: any[]) => unknown> =
T extends {(...arguments: infer A): unknown; (...arguments: any[]): unknown}
? unknown[] extends A
? false
: true
: false;

@@ -227,3 +227,6 @@ import type {LiteralUnion} from './literal-union';

type ExportConditions = {[condition in ExportCondition]: Exports};
/**
A mapping of conditions and the paths to which they resolve.
*/
type ExportConditions = {[condition in ExportCondition]?: Exports};

@@ -237,10 +240,9 @@ /**

| Array<string | ExportConditions>
| ExportConditions
| {[path: string]: Exports};
| ExportConditions;
/**
Import map entries of a module, optionally with conditions.
Import map entries of a module, optionally with conditions and subpath imports.
*/
export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
[key: `#${string}`]: string | {[key in ExportCondition]?: Exports};
[key: `#${string}`]: Exports;
};

@@ -247,0 +249,0 @@

@@ -1,2 +0,2 @@

import type {BuiltIns} from './internal';
import type {BuiltIns, HasMultipleCallSignatures} from './internal';

@@ -32,2 +32,4 @@ /**

Note that types containing overloaded functions are not made deeply readonly due to a [TypeScript limitation](https://github.com/microsoft/TypeScript/issues/29732).
@category Object

@@ -70,16 +72,1 @@ @category Array

};
/**
Test if the given function has multiple call signatures.
Needed to handle the case of a single call signature with properties.
Multiple call signatures cannot currently be supported due to a TypeScript limitation.
@see https://github.com/microsoft/TypeScript/issues/29732
*/
type HasMultipleCallSignatures<T extends (...arguments: any[]) => unknown> =
T extends {(...arguments: infer A): unknown; (...arguments: any[]): unknown}
? unknown[] extends A
? false
: true
: false;
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc