에러 메세지
type SomethingComplex = {
foo: number,
bar: string
}
function takeSomethingComplex(arg: SomethingComplex) {
}
function getBar(): string {
return 'some bar';
}
//////////////////////////////////
// Example error production
//////////////////////////////////
const fail = {
foo: 123,
bar: getBar
};
takeSomethingComplex(fail); // TS ERROR HAPPENS HEREError Categories
Succinct
Detailed
How it shows up in an IDE Tooltip

Last updated