Socket
Socket
Sign inDemoInstall

io-ts

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io-ts - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

8

CHANGELOG.md

@@ -16,2 +16,10 @@ # Changelog

# 1.0.5
* **Bug Fix**
* workaround for upstream TypeScript bug 14041 (wrong generated declarations) (@gcanti)
* **Internal**
* optimize InterfaceType.encode (@gcanti)
* use definite assignment assertion for phantom fields (@gcanti)
# 1.0.4

@@ -18,0 +26,0 @@

14

lib/index.d.ts

@@ -53,5 +53,5 @@ import { Either } from 'fp-ts/lib/Either';

readonly encode: Encode<A, O>;
readonly '_A': A;
readonly '_O': O;
readonly '_I': I;
readonly _A: A;
readonly _O: O;
readonly _I: I;
constructor(

@@ -194,3 +194,3 @@ /** a unique name for this runtime type */

/** @alias `interface` */
export declare const type: <P extends Props>(props: P, name?: string) => InterfaceType<P, { [K in keyof P]: P[K]["_A"]; }, { [K in keyof P]: P[K]["_O"]; }, mixed>;
export declare const type: <P extends Props>(props: P, name?: string) => InterfaceType<P, TypeOfProps<P>, OutputOfProps<P>, mixed>;
export declare class PartialType<P extends AnyProps, A = any, O = A, I = mixed> extends Type<A, O, I> {

@@ -207,3 +207,3 @@ readonly props: P;

};
export declare const partial: <P extends Props>(props: P, name?: string) => PartialType<P, { [K in keyof P]?: P[K]["_A"] | undefined; }, { [K in keyof P]?: P[K]["_O"] | undefined; }, mixed>;
export declare const partial: <P extends Props>(props: P, name?: string) => PartialType<P, TypeOfPartialProps<P>, OutputOfPartialProps<P>, mixed>;
export declare class DictionaryType<D extends Any, C extends Any, A = any, O = A, I = mixed> extends Type<A, O, I> {

@@ -221,3 +221,3 @@ readonly domain: D;

};
export declare const dictionary: <D extends Type<any, any, mixed>, C extends Type<any, any, mixed>>(domain: D, codomain: C, name?: string) => DictionaryType<D, C, { [K in D["_A"]]: C["_A"]; }, { [K in D["_O"]]: C["_O"]; }, mixed>;
export declare const dictionary: <D extends Type<any, any, mixed>, C extends Type<any, any, mixed>>(domain: D, codomain: C, name?: string) => DictionaryType<D, C, TypeOfDictionary<D, C>, OutputOfDictionary<D, C>, mixed>;
export declare class UnionType<RTS extends Array<Any>, A = any, O = A, I = mixed> extends Type<A, O, I> {

@@ -267,3 +267,3 @@ readonly types: RTS;

/** Specifies that only the given interface properties are allowed */
export declare const strict: <P extends Props>(props: P, name?: string) => StrictType<P, { [K in keyof P]: P[K]["_A"]; }, { [K in keyof P]: P[K]["_O"]; }, mixed>;
export declare const strict: <P extends Props>(props: P, name?: string) => StrictType<P, TypeOfProps<P>, OutputOfProps<P>, mixed>;
export declare type TaggedProps<Tag extends string> = {

@@ -270,0 +270,0 @@ [K in Tag]: LiteralType<any>;

@@ -449,3 +449,6 @@ "use strict";

var k = keys[i];
s[k] = types[i].encode(a[k]);
var encode = types[i].encode;
if (encode !== exports.identity) {
s[k] = encode(a[k]);
}
}

@@ -452,0 +455,0 @@ return s;

{
"name": "io-ts",
"version": "1.0.4",
"version": "1.0.5",
"description": "TypeScript compatible runtime type system for IO validation",

@@ -41,7 +41,7 @@ "files": ["lib"],

"mocha": "3.2.0",
"prettier": "1.8.2",
"prettier": "^1.11.0",
"ts-node": "3.2.0",
"tslint": "4.4.2",
"tslint-config-standard": "4.0.0",
"typescript": "^2.7.1",
"typescript": "^2.7.2",
"typings-checker": "1.1.2"

@@ -48,0 +48,0 @@ },

@@ -406,4 +406,6 @@ [![build status](https://img.shields.io/travis/gcanti/io-ts/master.svg?style=flat-square)](https://travis-ci.org/gcanti/io-ts)

type NestedInterfaceType = {
foo: string;
bar: any;
foo: string;
bar: t.TypeOfProps<{
baz: t.StringType;
}>;
}

@@ -410,0 +412,0 @@

Sorry, the diff of this file is not supported yet

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