ts-interface-checker
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -71,3 +71,3 @@ /** | ||
constructor(ttypes: TType[]); | ||
getChecker(suite: ITypeSuite, strict: boolean): CheckerFunc; | ||
getChecker(suite: ITypeSuite, strict: boolean, allowedProps?: Set<string>): CheckerFunc; | ||
} | ||
@@ -81,3 +81,3 @@ /** | ||
constructor(ttypes: TType[]); | ||
getChecker(suite: ITypeSuite, strict: boolean): CheckerFunc; | ||
getChecker(suite: ITypeSuite, strict: boolean, allowedProps?: Set<string>): CheckerFunc; | ||
} | ||
@@ -84,0 +84,0 @@ /** |
@@ -216,5 +216,5 @@ "use strict"; | ||
} | ||
TUnion.prototype.getChecker = function (suite, strict) { | ||
TUnion.prototype.getChecker = function (suite, strict, allowedProps) { | ||
var _this = this; | ||
var itemCheckers = this.ttypes.map(function (t) { return t.getChecker(suite, strict); }); | ||
var itemCheckers = this.ttypes.map(function (t) { return t.getChecker(suite, strict, allowedProps); }); | ||
return function (value, ctx) { | ||
@@ -253,4 +253,4 @@ var ur = ctx.unionResolver(); | ||
} | ||
TIntersection.prototype.getChecker = function (suite, strict) { | ||
var allowedProps = new Set(); | ||
TIntersection.prototype.getChecker = function (suite, strict, allowedProps) { | ||
if (allowedProps === void 0) { allowedProps = new Set(); } | ||
var itemCheckers = this.ttypes.map(function (t) { return t.getChecker(suite, strict, allowedProps); }); | ||
@@ -257,0 +257,0 @@ return function (value, ctx) { |
{ | ||
"name": "ts-interface-checker", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Runtime library to validate data against TypeScript interfaces", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
73251
12