TypeScript Version: 2.9.2, 3.0.0-dev.20180705
Search Terms:
Code
import * as React from 'react'
interface A {
b: string
}
interface B extends A {
c: string
}
interface Props {
cb(val: A): void
}
const Comp: React.SFC<Props> = () => null
function cb(val: B) {
console.log(val.c)
}
const a = <Comp cb={cb}/> // no error
let f: Props['cb']
let f2: (val: A) => void
f = cb // no error
f2 = cb // error
Expected behavior:
Errors in all places
Actual behavior:
No error in jsx and when using Props['cb']
Playground Link:
Related Issues:
TypeScript Version: 2.9.2, 3.0.0-dev.20180705
Search Terms:
Code
Expected behavior:
Errors in all places
Actual behavior:
No error in jsx and when using
Props['cb']Playground Link:
Related Issues: