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

runtypes

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

runtypes - npm Package Compare versions

Comparing version 6.4.0 to 6.4.1

2

lib/match.d.ts

@@ -7,3 +7,3 @@ import { RuntypeBase } from './runtype';

[key in keyof A]: A[key] extends PairCase<any, infer Z> ? Z : unknown;
}>;
}[number]>;
export declare type PairCase<A extends RuntypeBase, Z> = [A, Case<A, Z>];
import { Runtype, RuntypeBase, Static } from '../runtype';
import { Optional } from './optional';
declare type DictionaryKeyType = string | number | symbol;
declare type StringLiteralFor<K extends DictionaryKeyType> = K extends string ? 'string' : K extends number ? 'number' : K extends symbol ? 'symbol' : never;
declare type DictionaryKeyRuntype = RuntypeBase<string | number | symbol>;
export interface Dictionary<V extends RuntypeBase, K extends DictionaryKeyType> extends Runtype<{
export interface Dictionary<V extends RuntypeBase, K extends DictionaryKeyType> extends Runtype<V extends Optional<any> ? {
[_ in K]?: Static<V>;
} : {
[_ in K]: Static<V>;

@@ -12,4 +15,6 @@ }> {

}
export interface StringDictionary<V extends RuntypeBase> extends Runtype<{
[_: string]: Static<V>;
export interface StringDictionary<V extends RuntypeBase> extends Runtype<V extends Optional<any> ? {
[_ in string]?: Static<V>;
} : {
[_ in string]: Static<V>;
}> {

@@ -20,4 +25,6 @@ tag: 'dictionary';

}
export interface NumberDictionary<V extends RuntypeBase> extends Runtype<{
[_: number]: Static<V>;
export interface NumberDictionary<V extends RuntypeBase> extends Runtype<V extends Optional<any> ? {
[_ in number]?: Static<V>;
} : {
[_ in number]: Static<V>;
}> {

@@ -24,0 +31,0 @@ tag: 'dictionary';

{
"name": "runtypes",
"version": "6.4.0",
"version": "6.4.1",
"description": "Runtime validation for static types",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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