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
During debugging the d.ts files, it is often helpful to see the type TS inferred.
Now, I do this by writing temporarily
expectType<string>(expressionOfAComplexType)
This fails, and in the error message we see the type TS inferred, e.g.:
Argument of type { <T>(this: T, thisArg: any): T; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(thi... is not assignable to parameter of type string.
That helps for "not to complex" types. But, as you can see, when the type becomes more complex, the output is shortened with ellipsis.
It would be nice to have a printType that we could use like
printType(expressionOfAComplexType)
that would print the complete type to stdout.
The text was updated successfully, but these errors were encountered:
During debugging the
d.ts
files, it is often helpful to see the type TS inferred.Now, I do this by writing temporarily
This fails, and in the error message we see the type TS inferred, e.g.:
That helps for "not to complex" types. But, as you can see, when the type becomes more complex, the output is shortened with ellipsis.
It would be nice to have a
printType
that we could use likethat would print the complete type to stdout.
The text was updated successfully, but these errors were encountered: