Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Move to TypeScript #78
Move to TypeScript #78
Changes from 12 commits
97a71de
458c5aa
418bf34
ddf05dc
681519b
86d51f8
4581855
4a2fb49
95a9491
6df53c4
bcea29a
bdb8f1a
3ba0bec
1c56336
ee1835d
8789e23
c050656
007a526
cbf99fe
7a0e4fa
dea8cf8
b830c6e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things here:
z.input
whileEffectiveOptions
should usez.infer
(which is the same asz.output
)Options
andCollectionsSchema
to interface and make all the other changes that I recommend, the docs should generate identical to current. However, we wantOptions
to be a type to solve for thehover
issue. So, we use the@interface
typedoc tag as a workaround for now. This is not ideal as the docs will haveOptions
as an interface and we're going to lose the TOC, etc. but the code itself will be correct. I'm going to update the isuses I have filed with typedoc, etc. to cover a few additional situations that I found just now. Once all those issues are addressed, we can eliminate the@interface
workaround.EDIT: Per my recent comment, the
@interface
workaround should no longer be required and its inclusion can be ignored. The docs should generate correctly withOptions
andCollectionConfig
as types assuming all the changes in other comments are implemented.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vernak2539 -
Sorry if I caused some confusion with my edit regarding
@interface
:( The part about needing the@interface
tag still applies but the other changes are still needed and seem to have been missed:Options
should usez.input
- This ensures that the docs correctly reflect optional properties. Currently, for example, collectionBase does not show as optional.EffectiveOptions
should usez.infer
- These are the options after defaults are applied so for options that have a default, even if the user doesn't provide one, the effective options, which we use, have proper types based on presence of defaults.CollectionConfig
should be a type - This ensures that "hover" works.The final code block should be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed in #79
This file was deleted.