You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered the following problem using the TypeCheck:
When there is a schema defining a property and a class providing this property via a getter function, Check and Errors do different things. Check passes while Errors report errors. Here is a mocha test to reproduce:
test('TypeBox error is different to check',function(){constFooSchema=Type.Object({foo: Type.String(),});classFoo{_foo: string;constructor(foo: string){this._foo=foo;}getfoo(){returnthis._foo;}}constfoo=newFoo('bar');constcompiled=TypeCompiler.Compile(FooSchema);assert.ok(compiled.Check(foo));consterrors=Array.of(compiled.Errors(foo));assert.strictEqual(errors.length,0);});
The text was updated successfully, but these errors were encountered:
We encountered the following problem using the TypeCheck:
When there is a schema defining a property and a class providing this property via a getter function, Check and Errors do different things.
Check
passes whileErrors
report errors. Here is a mocha test to reproduce:The text was updated successfully, but these errors were encountered: