New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

simplytyped

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simplytyped - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

1

dist/src/types/functions.d.ts

@@ -6,4 +6,5 @@ import { If } from './conditionals';

export declare type Predicate<A = any> = If<IsAny<A>, (...args: any[]) => boolean, (arg: A) => boolean>;
export declare type AnyFunc<R = any> = (...args: any[]) => R;
export declare function Readonly<T extends object>(obj: T): DeepReadonly<T>;
export declare function isKeyOf<T extends object>(obj: T, k: string): k is keyof T;
export declare function objectKeys<T extends object>(obj: T): (keyof T)[];

2

package.json
{
"name": "simplytyped",
"version": "0.2.5",
"version": "0.2.6",
"description": "yet another Typescript type library for advanced types",

@@ -5,0 +5,0 @@ "main": "dist/src/index",

@@ -46,3 +46,3 @@ # SimplyTyped

[Predicate](#predicate) - [ConstructorFunction](#constructorfunction) - [Readonly](#readonly) - [isKeyOf](#isKeyOf) - [objectKeys](#objectkeys)
[Predicate](#predicate) - [ConstructorFunction](#constructorfunction) - [AnyFunc](#anyfunc) - [Readonly](#readonly) - [isKeyOf](#isKeyOf) - [objectKeys](#objectkeys)

@@ -454,2 +454,10 @@ **[Utils](#utils)**

### AnyFunc
Concisely and cleanly define an arbitrary function.
Useful when designing many api's that don't care what function they take in, they just need to know what it returns.
```ts
type got = AnyFunc; // => (...args: any[]) => any;
type got2 = AnyFunc<number>; // => (...args: any[]) => number;
```
### Readonly

@@ -456,0 +464,0 @@ This takes a runtime object and makes its properties readonly.

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