We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
toJSON
1 parent 789dbf8 commit b4d6db4Copy full SHA for b4d6db4
src/Calliope/ModelCollection.ts
@@ -418,7 +418,7 @@ export default class ModelCollection<T extends Model> extends Collection<T> {
418
/**
419
* @inheritDoc
420
*/
421
- public override toJSON(): { elements: ReturnType<typeof JSON.parse>[] } {
+ public override toJSON(): { elements: Model['toJSON'][] } {
422
// eslint-disable-next-line max-len
423
// https://security.stackexchange.com/questions/7001/how-should-web-app-developers-defend-against-json-hijacking/7003#7003
424
return { elements: this.toArray().map(model => model.toJSON()) };
0 commit comments