강의

멘토링

커뮤니티

Inflearn Community Q&A

juyoungh980667's profile image
juyoungh980667

asked

TypeScript Introduction - From Basics to Practice

Type descriptions and API function type definition hints defined in the application

첫번째 인터페이스

Written on

·

311

1

interface PhoneNumberDictionary {
  [phone: string]: {
    num: number;
  };
}

phone: string 부분에 대괄호는 배열이 아니라 타입 정의를 해주기 위해서 필요한 것 같은데 맞게 이해한건가요?

javascriptes6typescript

Answer 2

1

juyoungh98님의 프로필 이미지
juyoungh98
Questioner

답변 감사합니다 강의 너무 잘 보고 있습니다!! :D

1

captain님의 프로필 이미지
captain
Instructor

안녕하세요 juyoung님, 네 맞습니다. [phone: string] 이 부분은 객체 키에 대한 타입을 정의하는 부분입니다 :)

juyoungh980667's profile image
juyoungh980667

asked

Ask a question