3
나는이 같은 유형을 선언 할 : typescript에서 Map 유형을 선언하는 방법은 무엇입니까?
interface DependData {[key: string]: string};
그러나이 같은 오류가
:Statements are not allowed in ambient contexts
나는이 같은 유형을 선언 할 : typescript에서 Map 유형을 선언하는 방법은 무엇입니까?
interface DependData {[key: string]: string};
그러나이 같은 오류가
:Statements are not allowed in ambient contexts
당신이 설명하는 오류 메시지는 정의 파일에서 발생합니다.
interface DependData {
[key: string]: string;
}
:
당신이 올바른 구문을 사용하여 인터페이스 선언의 끝에 세미콜론을 제거해야,이 작품을 만들려면