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

Documentation for JTDSchemaType #1457

Merged
merged 4 commits into from Feb 23, 2021

Conversation

erikbrinkman
Copy link
Collaborator

What issue does this pull request resolve?

Adds some documentation to JTDSchemaType

What changes did you make?

See above

Is there anything that requires more attention while reviewing?

I'm not really sure how much detail you want. This seems like enough to me, but I'm definitely open. I'm not sure the usage of JTD in the readme is correct. Can you just import AJV or do you need to import AjvJTD? Or pass the jtd: true option? Can you import nested directories in typescript, (e.g. does import AjvJTD from "ajv/dist/jtd"; work?) ?I've only used the types in deno.

Again, this is stacked, so ignore the first commit.

Copy link
Member

@epoberezkin epoberezkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great - one comment there

interface MyType {
num: number;
optionalStr?: string;
nullableEnum: "1" | "2";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be nullableEnum: "1" | "2" | null
Or am I missing something?

Also, I'd use string strings here, for people accidentally not to think you can use numbers...

@erikbrinkman
Copy link
Collaborator Author

both of those made sense. Any comment on the typescript in the README?

@epoberezkin
Copy link
Member

Any comment on the typescript in the README?

looks ok - merging it. Would be good to add example with compile, but let's understand first why it requires explicit type annotation (question in another PR)

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

Successfully merging this pull request may close these issues.

None yet

2 participants