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

Add type definitions #7110

Open
JohnGrisham opened this issue Mar 30, 2021 · 12 comments
Open

Add type definitions #7110

JohnGrisham opened this issue Mar 30, 2021 · 12 comments
Labels
what do you think? Community feedback requested

Comments

@JohnGrisham
Copy link

This is just an issue to track interest in type definitions for the framework.

If there is enough interest I will consider working on adding definitions as I have time. With the consent of the maintainers, this can be directly in the repo or if a separation is more desirable they can just be added to the Definitely Typed library.

https://github.com/DefinitelyTyped/DefinitelyTyped

Please let me know if this interests you by giving the thumbs up here.

I would also love some feedback from @mikermcneil

@sailsbot
Copy link

@JohnGrisham Thanks for posting! We'll take a look as soon as possible.

In the mean time, there are a few ways you can help speed things along:

  • look for a workaround. (Even if it's just temporary, sharing your solution can save someone else a lot of time and effort.)
  • tell us why this issue is important to you and your team. What are you trying to accomplish? (Submissions with a little bit of human context tend to be easier to understand and faster to resolve.)
  • make sure you've provided clear instructions on how to reproduce the bug from a clean install.
  • double-check that you've provided all of the requested version and dependency information. (Some of this info might seem irrelevant at first, like which database adapter you're using, but we ask that you include it anyway. Oftentimes an issue is caused by a confluence of unexpected factors, and it can save everybody a ton of time to know all the details up front.)
  • read the code of conduct.
  • if appropriate, ask your business to sponsor your issue. (Open source is our passion, and our core maintainers volunteer many of their nights and weekends working on Sails. But you only get so many nights and weekends in life, and stuff gets done a lot faster when you can work on it during normal daylight hours.)
  • let us know if you are using a 3rd party plugin; whether that's a database adapter, a non-standard view engine, or any other dependency maintained by someone other than our core team. (Besides the name of the 3rd party package, it helps to include the exact version you're using. If you're unsure, check out this list of all the core packages we maintain.)

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

@mikermcneil
Copy link
Member

@JohnGrisham If you think you'll have the bandwidth to look after the bindings, then it'd be great to have support for Sails added externally in the DefinitivelyTyped repo. I don't use TypeScript myself for now, but since the bindings can live externally to the Sails repo, and there will be an active user of TypeScript maintaining them, I think this sounds awesome!

@JohnGrisham
Copy link
Author

@JohnGrisham If you think you'll have the bandwidth to look after the bindings, then it'd be great to have support for Sails added externally in the DefinitivelyTyped repo. I don't use TypeScript myself for now, but since the bindings can live externally to the Sails repo, and there will be an active user of TypeScript maintaining them, I think this sounds awesome!

Thanks for the feedback! I was hoping to also get some feedback from the community but I haven't seen much of a desire to use Typescript with Sails. I may circle back to this when I have time or if interest does arise. I just ask that this issue be left up if nothing else but to track interest.

@mikermcneil mikermcneil added the what do you think? Community feedback requested label Apr 28, 2021
@TheAdamGalloway
Copy link

+1 for adding TypeScript definitions. I'm new to TS myself but enjoy the stability it provides to my code. I can't promise anything but I will try to contribute to any efforts you make @JohnGrisham. This could be an alright starting point (but think it predates v1.0): https://github.com/effervescentia/typed-sails

@sailsbot sailsbot removed the what do you think? Community feedback requested label Apr 29, 2021
@eashaw eashaw added the what do you think? Community feedback requested label May 7, 2021
@mrtnzagustin
Copy link

+1 for this, i moved to express with typeORM + joi for some clients projects and this would be an awesome upgrade for the community to make sails more pluggable

@sailsbot sailsbot removed the what do you think? Community feedback requested label May 26, 2021
@mrtnzagustin
Copy link

Some types i used https://gist.github.com/joeherold/cf10ee8a11e145519a7ff960b3ac96a7, credits to @joeherold

@eashaw eashaw added the what do you think? Community feedback requested label Jun 1, 2021
@ksaitor
Copy link

ksaitor commented Jun 29, 2021

@mrtnzagustin did declare var sails: Sails.GlobalSailsApplication work for you? I'm trying to reuse the same type definitions and declaring sails globally doesn't seem to work. VSCode picks up the definitions, but Sails itself throws an error during runtime, right after start.

@sailsbot sailsbot removed the what do you think? Community feedback requested label Jun 29, 2021
@eashaw eashaw added the what do you think? Community feedback requested label Jun 29, 2021
@xziy
Copy link

xziy commented Dec 17, 2021

+1

@sailsbot sailsbot removed the what do you think? Community feedback requested label Dec 17, 2021
@eashaw eashaw added the what do you think? Community feedback requested label Dec 17, 2021
@ewildee
Copy link

ewildee commented Dec 21, 2021

+1 It would be great to have Typings support for Sails!

@sailsbot sailsbot removed the what do you think? Community feedback requested label Dec 21, 2021
@eashaw eashaw added the what do you think? Community feedback requested label Jan 14, 2022
@sayami007
Copy link

I will be starting my work to create a definition file.

@sailsbot sailsbot removed the what do you think? Community feedback requested label Jan 31, 2023
@JohnGrisham
Copy link
Author

@sayami007 I don't think I have time to help out but feel free to add me as a reviewer.

@sayami007
Copy link

@JohnGrisham Yes sure.

@eashaw eashaw added the what do you think? Community feedback requested label Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
what do you think? Community feedback requested
Development

No branches or pull requests

10 participants