Fix Typescript blockquote PR906
This commit is contained in:
parent
af8041a351
commit
bc8f9dd390
@ -83,13 +83,14 @@ declare namespace JSX {
|
||||
在上例中,`<foo />`没有问题,但是`<bar />`会报错,因为它没在`JSX.IntrinsicElements`里指定。
|
||||
|
||||
> 注意:你也可以在`JSX.IntrinsicElements`上指定一个用来捕获所有字符串索引:
|
||||
>```ts
|
||||
>declare namespace JSX {
|
||||
> interface IntrinsicElements {
|
||||
> [elemName: string]: any;
|
||||
> }
|
||||
>}
|
||||
>```
|
||||
|
||||
```ts
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
[elemName: string]: any;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 基于值的元素
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user