Socket
Socket
Sign inDemoInstall

ts-interface-checker

Package Overview
Dependencies
0
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.7 to 0.1.8

3

dist/types.d.ts

@@ -117,5 +117,6 @@ /**

export declare function opt(typeSpec: TypeSpec): TOptional;
export declare class TOptional {
export declare class TOptional extends TType {
ttype: TType;
constructor(ttype: TType);
getChecker(suite: ITypeSuite, strict: boolean): CheckerFunc;
}

@@ -122,0 +123,0 @@ /**

@@ -349,8 +349,17 @@ "use strict";

exports.opt = opt;
var TOptional = /** @class */ (function () {
var TOptional = /** @class */ (function (_super) {
__extends(TOptional, _super);
function TOptional(ttype) {
this.ttype = ttype;
var _this = _super.call(this) || this;
_this.ttype = ttype;
return _this;
}
TOptional.prototype.getChecker = function (suite, strict) {
var itemChecker = this.ttype.getChecker(suite, strict);
return function (value, ctx) {
return value === undefined || itemChecker(value, ctx);
};
};
return TOptional;
}());
}(TType));
exports.TOptional = TOptional;

@@ -357,0 +366,0 @@ /**

{
"name": "ts-interface-checker",
"version": "0.1.7",
"version": "0.1.8",
"description": "Runtime library to validate data against TypeScript interfaces",

@@ -47,3 +47,3 @@ "main": "dist/index",

"@types/benchmark": "^1.0.31",
"@types/chai": "^4.0.8",
"@types/chai": "~4.0.8",
"@types/mocha": "^2.2.44",

@@ -50,0 +50,0 @@ "@types/node": "^8.0.57",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc