Skip to content

Typescript (TS) global approach/migration (Parse server and JS SDK) #9844

@Moumouls

Description

@Moumouls

New Issue Checklist

Issue Description

The official releases of parse-server and Parse JS SDK now include TypeScript types. However, these definitions differ from and are incomplete compared to the @types/parse package.

Currently, upgrading parse-server and Parse JS SDK in a fully typed codebase leads to type conflicts and many type errors.

Developers working in TypeScript codebases who want to upgrade to benefit from new features, fixes, and security updates will not be able to do so easily.

The @types/parse package worked quite well previously.

TypeScript support is important, but Parse has a non-standard architecture:

  • Parse Server relies on Parse SDK
  • Parse SDK is used as a singleton and has additional capabilities when used server-side with parse-server (Cloud hooks)
  • @types/parse already exists with well-defined types

I think the best plan would be:

  1. Contributing to @types/parse to fill all missing areas, and updating documentation to ask parse-server TypeScript developers to install @types/parse if needed. We could also consider creating @types/parse-server that extends @types/parse features for server-specific functionality (like cloud code).

  2. Once @types/parse and/or @types/parse-server are complete, we can copy the type definitions directly into parse and parse-server.

  3. Begin migrating some JS files to TypeScript to properly transition from .d.ts files to a truly typed project.

Bonus: If we lack the resources to migrate JS to TS files, we can still maintain fully working .d.ts files that are easy to maintain in each repository (parse-server and Parse JS SDK).

If this plan seems acceptable, it means we should revert some of the TypeScript work done on parse-server and Parse JS SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions