Open moltar opened 3 years ago
Describe the bug
I am seeing String methods are mixed in with the object properties.
To Reproduce
import { createSchema, TsjsonParser } from "ts-json-validator" const username = createSchema({ type: "string", minLength: 2 }) const password = createSchema({ type: "string" }) export const register = createSchema({ type: "object", properties: { username, password, }, required: ["username", "password"] }) const registerParser = new TsjsonParser(register) const body = registerParser.parse('{}')
Expected behavior
To have only username and password props.
username
password
Actual behavior
Lots of unrelated props, from the String object.
Screenshots
Additional context
"typescript": "4.4.3" "ts-json-validator": "0.7.1", "tsconfigs": "5.0.0"
tsconfig.json
{ "extends": "tsconfigs/agnostic-module", "compilerOptions": { "jsx": "react" }, "include": [ "src/**/*", "lambda/**/*" ] }
Describe the bug
I am seeing String methods are mixed in with the object properties.
To Reproduce
Expected behavior
To have only
username
andpassword
props.Actual behavior
Lots of unrelated props, from the String object.
Screenshots
Additional context
packages:
tsconfig.json