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 0.1.0 to 0.1.1

9

lib-jsnext/index.d.ts

@@ -73,9 +73,8 @@ import { Either } from 'fp-ts/lib/Either';

};
export declare class InterfaceType<P extends Props> extends Type<{
export declare type InterfaceOf<P extends Props> = {
[K in keyof P]: TypeOf<P[K]>;
}> {
};
export declare class InterfaceType<P extends Props> extends Type<InterfaceOf<P>> {
readonly props: P;
constructor(name: string, validate: Validate<{
[K in keyof P]: TypeOf<P[K]>;
}>, props: P);
constructor(name: string, validate: Validate<InterfaceOf<P>>, props: P);
}

@@ -82,0 +81,0 @@ declare function interfaceType<P extends Props>(props: P, name?: string): InterfaceType<P>;

@@ -73,9 +73,8 @@ import { Either } from 'fp-ts/lib/Either';

};
export declare class InterfaceType<P extends Props> extends Type<{
export declare type InterfaceOf<P extends Props> = {
[K in keyof P]: TypeOf<P[K]>;
}> {
};
export declare class InterfaceType<P extends Props> extends Type<InterfaceOf<P>> {
readonly props: P;
constructor(name: string, validate: Validate<{
[K in keyof P]: TypeOf<P[K]>;
}>, props: P);
constructor(name: string, validate: Validate<InterfaceOf<P>>, props: P);
}

@@ -82,0 +81,0 @@ declare function interfaceType<P extends Props>(props: P, name?: string): InterfaceType<P>;

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

@@ -5,0 +5,0 @@ "files": [

@@ -144,1 +144,32 @@ # The idea

| recursive types | | `t.recursion(name, definition)` |
# Known issues
Due to an upstream [bug](https://github.com/Microsoft/TypeScript/issues/14041), VS Code might display weird types for nested interfaces
```ts
const NestedInterface = t.interface({
foo: t.interface({
bar: t.string
})
});
type NestedInterfaceType = t.TypeOf<typeof NestedInterface>;
/*
Hover on NestedInterfaceType will display
type NestedInterfaceType = {
foo: t.InterfaceOf<{
bar: t.Type<string>;
}>;
}
instead of
type NestedInterfaceType = {
foo: {
bar: string;
};
}
*/
```

Sorry, the diff of this file is not supported yet

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