-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Description
TypeScript Version: 3.5.1
Search Terms: thisparametertype unknown
Code
interface Foo { blub: string };
function fn(this: Foo) {}
// with strictFunctionTypes ENABLED, this evaluates to Foo.
// with strictFunctionTypes DISABLED, it evaluates to unknown.
type Test = ThisParameterType<typeof fn>;
Expected behavior:
ThisParameterType<typeof fn>
should be Foo
, regardless of strictFunctionTypes
setting.
Actual behavior:
ThisParameterType<>
evaluates to unknown
, always, when strictFunctionTypes
is disabled.
Related Issues:
404: related issue not found
dsommerich and ExE-Boss
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue