Skip to content

[feature-prototype-review1] Prototype 형태의 Function 사용 #8

@monolifeYw

Description

@monolifeYw

var ClassType = function() {};
ClassType.prototype = {
init: function(){
console.log('init');
}
}

차후에 서드파티 형태로 이러한 형태를 사용을 하려 할때,
ex ) jQuery 같은 형태는 $.extend 또는 $.fn.extend 같은 형태로 확장성 있게 사용.

현재 굳이
var classType = new wave.ClassType() 은 아니더라도,

ex )
wave.breeze = (wave, { test: new ClassType() } ) 라던지, ( gust도 동일 )
wave.gust = (wave, 'test', ClassType ) 처럼 무언가 확장하기 편한 구조가 있으면 좋겠다는 생각.

현재 구조에서 extend로 해당 구현이 가능하다면,
breeze, gust 안에 저 스펙도 같이 포함이 되면 좋겠음.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions