-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
docs: emphasize automatic type inference in TypeScript intro and statics/methods, remove duplicated statics.md #15421
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
Conversation
…ics/methods, remove duplicated statics.md
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.
Pull Request Overview
This PR updates the TypeScript documentation to emphasize Mongoose's automatic type inference for statics and methods while removing the duplicated statics.md file.
- Merged and updated content on statics and methods into a single file.
- Revised code samples and documentation in the TypeScript guide to reflect automatic type inference usage.
- Removed the deprecated docs/typescript/statics.md file.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
docs/typescript/statics.md | Removed redundant content now merged into statics-and-methods.md. |
docs/typescript/statics-and-methods.md | Updated documentation and code samples for statics and methods with emphasis on automatic type inference. |
docs/typescript.md | Revised introductory guide with updated code samples and link text adjustments. |
Comments suppressed due to low confidence (2)
docs/typescript/statics-and-methods.md:1
- [nitpick] The header in this file is now 'Statics in TypeScript' which may be inconsistent with its filename ('statics-and-methods.md') if both statics and methods are intended to be covered. Consider aligning the header with the file name or adjusting the filename for clarity.
# Statics in TypeScript
docs/typescript.md:143
- [nitpick] The link text refers to 'methods in TypeScript', but the target file's header is 'Statics in TypeScript', which may be confusing. Verify the intended focus and update the link text or target file content to ensure consistency.
Now that you've seen the basics of how to use Mongoose in TypeScript, let's take a look at [methods in TypeScript](typescript/statics-and-methods.html).
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.
Mostly looks good to me, though there are some invalid links and a incomplete sentence and some typos.
Co-authored-by: hasezoey <[email protected]>
Co-authored-by: hasezoey <[email protected]>
Co-authored-by: hasezoey <[email protected]>
Co-authored-by: hasezoey <[email protected]>
Co-authored-by: hasezoey <[email protected]>
Summary
Re: discussion from mongoosejs/mongoose-lean-virtuals#78. I made the top-level
typescript.md
TypeScript intro emphasize using automatic type inference, as well asstatics-and-methods.md
. In general, I copied overstatics.md
intostatics-and-methods.md
and removedstatics.md
, because we don't link tostatics.md
anywhere but the content is more up-to-date thanstatics-and-methods.md
.Examples