Weitere ähnliche Inhalte
Ähnlich wie 진보한 개발 환경에서 품질 좋은 코드 생산 (WebStorm) (20)
진보한 개발 환경에서 품질 좋은 코드 생산 (WebStorm)
- 348.
/**
* @param {Object} obj
* @param {string|number} key
*/
var findBy = function(obj, key){
// do something...
};
/**
* @type {string}
*/
var any = ‘name’;
- 392.
/**
* @param {Array} arr
* @param {string|number} key
*/
var findBy = function(arr, key){
// do something...
};
- 546. CODE/1
var Phone = function(){this.init.apply(this, arguments);};
Phone.prototype = {
id : 0,
type : '',
model : '',
name : '',
/**
* @constructs
*/
init : function(id, type, model, name){
this.id = id;
this.type = type;
this.model = model;
this.name = name;
}
};
- 547. CODE/2
var Phones = function(){this.init.apply(this, arguments);};
Phones.prototype = {
/**
* @type {Array.Phone}
*/
_phones : null,
/**
* @constructs
*/
init : function(){
this._phones = [];
},
/**
* @returns {Array.Phone}
*/
getPhones : function(){
return this._phones;
}
};