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

typit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typit - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

.d.ts/main.d.ts

4

package.json
{
"name": "typit",
"version": "0.2.0",
"version": "0.3.0",
"description": "Fully recursive runtime typechecking.",

@@ -22,3 +22,3 @@ "main": "js/main",

"author": "Trevor Sears <trevorsears.main@gmail.com> (http://trevorsears.io/)",
"license": "ISC",
"license": "GPL-3.0-or-later",
"bugs": {

@@ -25,0 +25,0 @@ "url": "https://github.com/T99/typit/issues"

@@ -7,1 +7,7 @@ # typit

### [Find typit on NPM.](https://www.npmjs.com/package/typit)
## Installation
Install from NPM with
```
$ npm install --save typit
```

@@ -7,3 +7,3 @@ /*

import Type from "./type";
import { Type } from "./type";

@@ -14,6 +14,6 @@ /**

* @author Trevor Sears <trevorsears.main@gmail.com>
* @version v0.1.0
* @version v0.3.0
* @since v0.1.0
*/
class ArrayType<E = any> extends Type<E[]> {
export class ArrayType<E = any> extends Type<E[]> {

@@ -61,4 +61,2 @@ private arrayType: Type;

}
export default ArrayType;
}

@@ -7,3 +7,3 @@ /*

import Type from "./type";
import { Type } from "./type";

@@ -14,11 +14,9 @@ /**

* @author Trevor Sears <trevorsears.main@gmail.com>
* @version v0.1.0
* @version v0.3.0
* @since v0.1.0
*/
interface ObjectTypeDefinition {
export interface ObjectTypeDefinition {
readonly [property: string]: Type | ObjectTypeDefinition;
}
export default ObjectTypeDefinition;
}

@@ -8,4 +8,4 @@ /*

import { IOObjectIterator } from "iter-over";
import Type from "./type";
import ObjectTypeDefinition from "./object-type-definition";
import { Type } from "./type";
import { ObjectTypeDefinition } from "./object-type-definition";

@@ -16,6 +16,6 @@ /**

* @author Trevor Sears <trevorsears.main@gmail.com>
* @version v0.1.0
* @version v0.3.0
* @since v0.1.0
*/
class ObjectType extends Type {
export class ObjectType extends Type {

@@ -179,4 +179,2 @@ private readonly objectName: string;

}
export default ObjectType;
}

@@ -7,3 +7,3 @@ /*

import Type from "./type";
import { Type } from "./type";

@@ -14,6 +14,6 @@ /**

* @author Trevor Sears <trevorsears.main@gmail.com>
* @version v0.1.0
* @version v0.3.0
* @since v0.1.0
*/
class OptionalType<T extends Type<E>, E = any> extends Type<E> {
export class OptionalType<T extends Type<E>, E = any> extends Type<E> {

@@ -48,4 +48,2 @@ private optionalType: Type<E>;

}
export default OptionalType;
}

@@ -7,3 +7,3 @@ /*

import Type from "./type";
import { Type } from "./type";

@@ -16,6 +16,6 @@ type Validator = (input: any) => boolean;

* @author Trevor Sears <trevorsears.main@gmail.com>
* @version v0.1.0
* @version v0.3.0
* @since v0.1.0
*/
class SpecialType<E> extends Type<E> {
export class SpecialType<E> extends Type<E> {

@@ -73,4 +73,2 @@ public static readonly ANY: SpecialType<any> = new SpecialType(

}
export default SpecialType;
}

@@ -7,3 +7,3 @@ /*

import Type from "./type";
import { Type } from "./type";

@@ -16,6 +16,6 @@ type Validator = (input: any) => boolean;

* @author Trevor Sears <trevorsears.main@gmail.com>
* @version v0.1.0
* @version v0.3.0
* @since v0.1.0
*/
class StandardType<E> extends Type<E> {
export class StandardType<E> extends Type<E> {

@@ -80,4 +80,2 @@ public static readonly NUMBER: StandardType<number> = new StandardType(

}
export default StandardType;
}

@@ -11,6 +11,6 @@ /*

* @author Trevor Sears <trevorsears.main@gmail.com>
* @version v0.1.0
* @version v0.3.0
* @since v0.1.0
*/
abstract class Type<E = any> {
export abstract class Type<E = any> {

@@ -35,4 +35,2 @@ public abstract getTypeName(): string;

}
export default Type;
}
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