Parse-server types?

:wave:

I’m in the process of converting a pure-JS application backend that uses parse-server with some Cloud code. I’ve noticed that for Cloud code, I can leverage the types from the @types/parse package (which we’re also using on the frontend).

However, I seem unable to find any type declarations for the parse-server package? For now, I’ve started on a basic own parse-sever.d.ts declaration, but I’m sure it could be made vastly better, and I’m no Typescript wizard myself. Is there any prior art for this in the community to inherit from?

1 Like

I do have the same question myself. why there is no types for parse-server ? and when searched online the only thing I found related its your post here

I believe it would be a good addition. Would you guys be willed to contribute on that?

1 Like

Is there any update on this? I’m still fairly new to using parse-server (but working ion a mature parse-server based project) and the lack of types is quite frustrating.

I’d be happy to help get something started with this. Has anyone started on anything in the DefinitelyTyped repo yet?

@sadortun what types do you use for Parse Server?

“Its Complicated” !

I created a custom parse-server.d.ts with the types i need for my upcoming PR 🎆 (continuation) Defined Schemas with auto migration by sadortun · Pull Request #7418 · parse-community/parse-server · GitHub and i’ve added some global types like ParseServerOptions and stuff. Not pretty, but it works.

As mentioned by @g.w, most of cloud types are already in @types/parse, there is many invalid / outdated types, so i’m just using @ts-expect-error to mute the parse type errors.

When the types will be moved in their respective repo (js sdk and server) it’ll be much easier to update and fix errors.

I need to finish the 4-5 PR i have open and after ill give you some help with this typing situation :laughing: :rocket:

1 Like