Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type 'string' is not assignable to type 'TSchemaPropertyType | undefined' #459

Open
dvelazquez1282 opened this issue Nov 10, 2022 · 1 comment

Comments

@dvelazquez1282
Copy link

Hi. I have started to use this library and I am trying to use the doc example in my project but I receive this error:

Type '{ properties: { email: { type: string; description: string; format: string; widget: string;
}; }; }' is not assignable to type 'ISchema'.
Types of property 'properties' are incompatible.
Type '{ email: { type: string; description: string; format: string; widget: string; }; }' is not assignable to type 'IProperties'.
Property 'email' is incompatible with index signature.
Type '{ type: string; description: string; format: string; widget: string; }' is not assignable to type 'ISchema'.
Types of property 'type' are incompatible.
Type 'string' is not assignable to type 'TSchemaPropertyType | undefined'.

The scheme used is the same of the example:

mySchema = { properties: { email: { type: "string", description: "email", format: "email", }, password: { type: "string", description: "Password", }, rememberMe: { type: "boolean", default: false, description: "Remember me", }, }, required: ["email", "password", "rememberMe"], };

codycodes added a commit to codycodes/ngx-schema-form that referenced this issue Feb 3, 2023
@codycodes
Copy link
Contributor

We need to declare the object as ISchema type as mentioned in the referenced commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants