Closed
Description
TypeScript Version: 2.7.0-dev.201xxxxx
2.8.3
Search Terms:
Code
class Protocol<T>{}
interface ReqTest {
abcde: string;
}
const PtlTest = new Protocol<ReqTest>();
function request<T>(ptl: Protocol<T>, req: T) { }
request(PtlTest, {})
Expected behavior:
Compile error.
Because request(PtlTest, {})
, param 2 {}
not match ReqTest
Actual behavior:
Compile success
Playground Link:
Related Issues: