Skip to content

fix: add types to help with required nodemon usage #2204

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 2 commits into from
May 25, 2024
Merged

fix: add types to help with required nodemon usage #2204

merged 2 commits into from
May 25, 2024

Conversation

remy
Copy link
Owner

@remy remy commented May 19, 2024

Hopefully helps devs use nodemon as required and adds some advice in tools like VS Code.

Copy link

netlify bot commented May 19, 2024

Deploy Preview for nodemon ready!

Name Link
🔨 Latest commit eabb7f7
🔍 Latest deploy log https://app.netlify.com/sites/nodemon/deploys/664a39a7cbfaa60008dc5c38
😎 Deploy Preview https://deploy-preview-2204--nodemon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@remy remy changed the title fix: add types to help required usage fix: add types to help with required nodemon usage May 25, 2024
@remy remy merged commit cd27c0b into main May 25, 2024
5 of 6 checks passed
Copy link

🎉 This PR is included in version 3.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

@chuyjr76033 chuyjr76033 left a comment

Choose a reason for hiding this comment

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

🤑

Comment on lines +107 to +108
restartable?: false | String;
colours?: Boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be the primitive types, not the object wrappers.

Suggested change
restartable?: false | String;
colours?: Boolean;
restartable?: false | string;
colours?: boolean;

Comment on lines +87 to +89
message: String;
/** contains the terminal escape codes to add colour, plus the "[nodemon]" prefix */
colour: String;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
message: String;
/** contains the terminal escape codes to add colour, plus the "[nodemon]" prefix */
colour: String;
message: string;
/** contains the terminal escape codes to add colour, plus the "[nodemon]" prefix */
colour: string;

// TODO: Define the type of NodemonEventConfig
type NodemonEventConfig = any;

interface NodemonSettings {
Copy link
Contributor

Choose a reason for hiding this comment

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

could add the jsdoc from the old DefinitelyTyped types for improved developer experience, as seen here:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/98e6d36d1a9b2c7ec918855454ef6b8642f8cf84/types/nodemon/index.d.ts#L116-L119

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

Successfully merging this pull request may close these issues.

3 participants