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
constQux: FunctionalComponent<{},['foo','bar']>=(props,{ emit })=>{emit('foo')// OKemit('foo',1,2)// OKemit('bar')// TS2345: Argument of type '"bar"' is not assignable to parameter of type '"foo"'}
What is expected?
No compile error.
What is actually happening?
TS2345 error is reported
Below code works as expected, but I think ['foo', 'bar'] is more straightforward and preferable.
Version
3.0.0
Reproduction link
wonderful-panda@5cb6c2d
Steps to reproduce
Pull linked commit, and run
yarn test-dts
This is a problematic code
What is expected?
No compile error.
What is actually happening?
TS2345 error is reported
Below code works as expected, but I think
['foo', 'bar']
is more straightforward and preferable.The text was updated successfully, but these errors were encountered: