Skip to content

함수의 반환 타입 #15

@bubobubobo

Description

@bubobubobo

아이템 12에서 typeof를 활용해 함수의 시그니처 타입을 사용할 수 있다고 나왔는데 내가 작성한 함수의 return 값들에 대한 타입을 지정할 때,

type TUseEffect = ReturnType<typeof useEffect>

이렇겐 안쓰겠지만 여튼 함수의 반환 타입을 타입으로 사용할 수 있습니다.

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