types: improve h() and TSX type inference
- Should allow extraneous props as attrs in TSX - Should check props when using constructor type returned by createComponent() in h()
This commit is contained in:
@@ -67,7 +67,14 @@ test('createComponent type inference', () => {
|
||||
}
|
||||
})
|
||||
// test TSX props inference
|
||||
;<MyComponent a={1} b="foo" dd={['foo']} ddd={['foo']} />
|
||||
;<MyComponent
|
||||
a={1}
|
||||
b="foo"
|
||||
dd={['foo']}
|
||||
ddd={['foo']}
|
||||
// should allow extraneous as attrs
|
||||
class="bar"
|
||||
/>
|
||||
})
|
||||
|
||||
test('type inference w/ optional props declaration', () => {
|
||||
|
||||
Reference in New Issue
Block a user