Skip to content

Typescript definitions outdated #7287

Description

@sadortun

New Issue Checklist

Issue Description

Not sure if i'm dooing something wrong, but it seems the typescript definitions doesnt match. For all Cloud methods, validationHandler are missing

ParseCloud.beforeSave = function (parseClass, handler, validationHandler) {
// ...
};
      function beforeSave<T extends Object = Object>(
                arg1: { new (): T } | string,
                func?: (request: BeforeSaveRequest<T>) => Promise<void> | void,
            ): void;

Steps to reproduce

Parse.Cloud.beforeSave('test', async (request) => {
}, {
  fields: {
  },
})

Actual Outcome

 - error TS2554: Expected 1-2 arguments, but got 3.

Expected Outcome

no errors :)

Failing Test Case / Pull Request

  • 🤩 I submitted a PR with a fix and a test case.
  • 🧐 I submitted a PR with a failing test case.

Environment

Server

  • Parse Server version: 4.5.0
  • Operating system: windows
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): mongo
  • Database version: eh
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): js
  • SDK version: 3.1

Logs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions