You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse.Schema save method documentation says that this method has the return type of Promise<Parse.Schema> but in reality it its Promise<Parse.RestSchema>
these two objects have totally different methods and properties and can not be used interchangeably.
Steps to reproduce
let schema : Parse.Schema = new Parse.Schema("MyClass");
schema = await schema.save();
const restSchema : Parse.RestSchema = await schema.get();
Actual Outcome
This sample code is completely acceptable by Typescript but in runtime throws an error, stating that schema object does not have a get method.
Expected Outcome
The return type should match what is actually returned. Either by changing Docs or Code.
Environment
Server
Parse Server version: 7.2.0
Operating system: Microsoft Windows 11
Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local
Database
System (MongoDB or Postgres): MongoDB
Database version: 6.0.16
Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local (Docker)
🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
New Issue Checklist
Issue Description
Parse.Schema
save
method documentation says that this method has the return type ofPromise<Parse.Schema>
but in reality it itsPromise<Parse.RestSchema>
these two objects have totally different methods and properties and can not be used interchangeably.
Steps to reproduce
Actual Outcome
This sample code is completely acceptable by Typescript but in runtime throws an error, stating that
schema
object does not have aget
method.Expected Outcome
The return type should match what is actually returned. Either by changing Docs or Code.
Environment
Server
Database
Client
The text was updated successfully, but these errors were encountered: