Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runtime): add height, width Source attrs (#4943)
add the height and width properties for the `SourceHTMLAttributes`. prior to this commit, users attempting to properly type a `<source/>` element in JSX would run into TypeScript errors: ```tsx render() { return <picture><source height={100} width={100}/></picture>; } ``` ``` [ ERROR ] TypeScript: src/components/my-component/my-component.tsx:31:29 Type '{ height: number; width: number; }' is not assignable to type 'SourceHTMLAttributes<HTMLSourceElement>'.Property 'height' does not exist on type 'SourceHTMLAttributes<HTMLSourceElement>'. L30: render() { L31: return <picture><source height={100} width={100}/></picture>; L32: } [26:05.7] build failed in 1.12 s ``` adding these typings as optional numbers resolves these types of compile-time errors fixes: #4942 STENCIL-977
- Loading branch information