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
{{ message }}
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
consta=<divtype="button"/>// TS handles it 👍 // Error:(9, 12) TS2322: Type '{ type: string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.// Property 'type' does not exist on type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Stardust element
<Imagetype="button"/>// Works in this case, when `as` prop is not specified 👍 // Error:(9, 12) TS2322: Type '{ type: string; }' is not assignable to type 'IntrinsicAttributes & Extended<ImageProps, DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>'.// Property 'type' does not exist on type 'IntrinsicAttributes & Extended<ImageProps, DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>'.
Stardust element and broken cases
<Imageas='div'type="button"/>// still not assignable, but passes type checks 💣
<Headerdescription={{as: 'div',type: 'button'}}/>// still not assignable, but passes type checks 💣
Version
latest
The text was updated successfully, but these errors were encountered:
layershifter
changed the title
Type checks on as prop are not working
Type checks on as prop are not working properly
Jun 21, 2019
Bug Report
Type checks on
as
prop works only in basic case.Primitive element
Stardust element
Stardust element and broken cases
Version
latest
The text was updated successfully, but these errors were encountered: