Skip to content

Parse.Cloud.FunctionRequest type doesn't have log definitions but they still work #8580

Open
@magnacartatron

Description

@magnacartatron

New Issue Checklist

Issue Description

Parse.Cloud.FunctionRequest doesn't not have typing for log
Parse.Cloud.TriggerRequest does

However one can use request.log.info inside a parse cloud function but we need to deal with typescript errors.

Can we add log to FunctionRequest as we sometimes do need additional logging for functions?

Steps to reproduce

Try to use a request.log.info or request.log.error inside a Parse.Cloud.Function in a typescript environment

Actual Outcome

It works but only if we use @ts-ignore

Expected Outcome

Not get type errors

Environment

Node 18.6

Server

  • Parse Server version: `6.2.0
  • Operating system: Ubuntu 22
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS

Database

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

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): Javascript
  • SDK version: 4.1

Logs

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