Skip to content

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

Merged
merged 8 commits into from
May 14, 2025

Conversation

vkarpov15
Copy link
Collaborator

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 as statics-and-methods.md. In general, I copied over statics.md into statics-and-methods.md and removed statics.md, because we don't link to statics.md anywhere but the content is more up-to-date than statics-and-methods.md.

Examples

@vkarpov15 vkarpov15 added this to the 8.15 milestone May 13, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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).

Copy link
Collaborator

@hasezoey hasezoey left a 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.

@hasezoey hasezoey added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label May 14, 2025
@vkarpov15 vkarpov15 merged commit c054618 into master May 14, 2025
3 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/docs-fixes branch May 14, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants