We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5daeaed commit 1ecc8ecCopy full SHA for 1ecc8ec
README.md
@@ -51,6 +51,10 @@ function narrowLiterals(array) {return array;}
51
* However, at runtime, always returns undefined and never invokes `fn`.
52
* Useful for getting the type of an expression without any runtime side-effects.
53
* TypeScript otherwise doesn't have any syntax for getting the inferred type of an expression.
54
+ *
55
+ * Usage:
56
+ * const __ignored = typeOfExpression(() => classFactoryFoo('bar'));
57
+ * type MyType = typeof __ignored;
58
*/
59
function typeOfExpression<T>(fn: (_?: any) => T): T;
60
function typeOfExpression() {};
0 commit comments