woogieReal / MDGround3

3 stars 0 forks source link

[TS] 함수 타입 선언 #86

Closed woogieReal closed 1 year ago

woogieReal commented 1 year ago

AS-IS

트리 유틸 메소드들의 함수 타입선언이 중복되어 있다.


export const replaceTree = (rootTree: Tree, targetTree: Tree): Tree => {
export const deleteTreeFromTrees = (rootTree: Tree, targetTree: Tree): Tree => {
export const addTreeToTrees = (rootTree: Tree, targetTree: Tree): Tree => {
``

# TO-BE
함수 타입을 선언하여 중복되는 타입 선언을 제거한다.