mirror of
https://github.com/flarum/framework.git
synced 2025-02-02 09:05:38 +08:00
Drop unnecessary JSDocs
This commit is contained in:
parent
09a55258a0
commit
ab2620147a
|
@ -71,7 +71,6 @@ export default abstract class Model {
|
||||||
/**
|
/**
|
||||||
* @param data A resource object from the API.
|
* @param data A resource object from the API.
|
||||||
* @param store The data store that this model should be persisted to.
|
* @param store The data store that this model should be persisted to.
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
constructor(data: ModelData = {}, store = null) {
|
constructor(data: ModelData = {}, store = null) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
|
@ -150,7 +149,6 @@ export default abstract class Model {
|
||||||
* Merge new attributes into this model locally.
|
* Merge new attributes into this model locally.
|
||||||
*
|
*
|
||||||
* @param attributes The attributes to merge.
|
* @param attributes The attributes to merge.
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
pushAttributes(attributes: ModelAttributes) {
|
pushAttributes(attributes: ModelAttributes) {
|
||||||
this.pushData({ attributes });
|
this.pushData({ attributes });
|
||||||
|
@ -161,7 +159,6 @@ export default abstract class Model {
|
||||||
*
|
*
|
||||||
* @param attributes The attributes to save. If a 'relationships' key
|
* @param attributes The attributes to save. If a 'relationships' key
|
||||||
* exists, it will be extracted and relationships will also be saved.
|
* exists, it will be extracted and relationships will also be saved.
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
save(
|
save(
|
||||||
attributes: SaveAttributes,
|
attributes: SaveAttributes,
|
||||||
|
@ -337,7 +334,6 @@ export default abstract class Model {
|
||||||
* @return false if no information about the relationship
|
* @return false if no information about the relationship
|
||||||
* exists; an array if it does, containing models if they have been
|
* exists; an array if it does, containing models if they have been
|
||||||
* loaded, and undefined for those that have not.
|
* loaded, and undefined for those that have not.
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
static hasMany<M extends Model>(name: string): () => (M | undefined)[] | false {
|
static hasMany<M extends Model>(name: string): () => (M | undefined)[] | false {
|
||||||
return function (this: Model) {
|
return function (this: Model) {
|
||||||
|
|
|
@ -223,10 +223,8 @@ export default class Store {
|
||||||
/**
|
/**
|
||||||
* Create a new record of the given type.
|
* Create a new record of the given type.
|
||||||
*
|
*
|
||||||
* @param {String} type The resource type
|
* @param type The resource type
|
||||||
* @param {Object} [data] Any data to initialize the model with
|
* @param data Any data to initialize the model with
|
||||||
* @return {Model}
|
|
||||||
* @public
|
|
||||||
*/
|
*/
|
||||||
createRecord<M extends Model>(type: string, data: ModelData = {}): M {
|
createRecord<M extends Model>(type: string, data: ModelData = {}): M {
|
||||||
data.type = data.type || type;
|
data.type = data.type || type;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user