You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument of type '""' is not assignable to parameter of type Foo
And the inline doc to be:
function test(foo: Foo): void
Actual behavior:
But the error message is
Argument of type '""' is not assignable to parameter of type '{ name: string; age: number; }'.
And the inline doc is
function test(foo: {
name: string;
age: number;
}): void
In this example, the current behavior is alright but in more complicated situations the error messages can become very verbose and intimidating. Using the types name would make them a lot cleaner IMO.
The text was updated successfully, but these errors were encountered:
Type aliases are just aliases, and they are eagerly resolved to what they alias by the compiler. This saves the compiler time and space when dealing with types. we try to do a reverse lookup process when we are writing the type name, but there is a limit to that.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.4.0
Code
Expected behavior:
I'd like the error message to be:
And the inline doc to be:
Actual behavior:
But the error message is
And the inline doc is
In this example, the current behavior is alright but in more complicated situations the error messages can become very verbose and intimidating. Using the types name would make them a lot cleaner IMO.
The text was updated successfully, but these errors were encountered: