Skip to content

TypeScript typing issue with "FunctionRequest" #7350

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

Closed
4 tasks done
nchambrier-iziwork opened this issue Apr 16, 2021 · 5 comments
Closed
4 tasks done

TypeScript typing issue with "FunctionRequest" #7350

nchambrier-iziwork opened this issue Apr 16, 2021 · 5 comments

Comments

@nchambrier-iziwork
Copy link

nchambrier-iziwork commented Apr 16, 2021

New Issue Checklist

Issue Description

When I received a Cloud Function request, it's supposed to by typed as Parse.Cloud.FunctionRequest<T>, but this type is incorrect:

  • req.jobName is supposed to exist (declared in CustomRequest which FunctionRequest inherits, but this property exists only for Job requests)
  • req.functionName is not declared, but it definitely exists

image

Fix

  • Remove jobName and jobId (and probably others?) from CustomRequest and declare it in JobRequest only
  • Add functionName: string (and probably others?) in FunctionRequest
@mtrezza
Copy link
Member

mtrezza commented Apr 16, 2021

Thanks for reporting.

Are you using DefinitelyTyped type definitions?

@nchambrier-iziwork
Copy link
Author

nchambrier-iziwork commented Apr 19, 2021 via email

@mtrezza
Copy link
Member

mtrezza commented Apr 19, 2021

Depends on your setup. Parse TS definitions are currently manually maintained in DefinitelyTyped.

That would be

npm install --save-dev @types/parse

That also means, that any incorrect definition would have to be corrected in the repo there

@TomWFox
Copy link
Contributor

TomWFox commented May 14, 2021

As this is an issue with the DefinitelyTyped definitions, I’m going to close this one out.

@TomWFox TomWFox closed this as completed May 14, 2021
@chendoron
Copy link

@TomWFox I'm confused why this is an issue with the DefinitelyTyped definitions,
The type defs over there correspond to parse, not parse-server.
parse-server has no type definitions at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants