Open
Description
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
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)
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc): JavaScript
- SDK version: 5.3.0