📎아이템 62 마이그레이션의 완성을 위해 noImplicitAny 설정하기
class Chart {
indices: number[];
// ...
}
getRanges() {
for (const r of this.indices) {
const low = r[0];
// ^? const low: any
const high = r[1];
// ^? const high: any
// ...
}
}getRanges() {
for (const r of this.indices) {
const low = r[0];
// ~~~~ Element implicitly has an 'any' type because
// type 'Number' has no index signature
const high = r[1];
// ~~~~ Element implicitly has an 'any' type because
// type 'Number' has no index signature
// ...
}
}📍 정리
📍 요약
Last updated