-
Notifications
You must be signed in to change notification settings - Fork 4
TypeScript doesn't type-check MDX #113
Comments
mdx-js/mdx#255 |
@plusk |
@JounQin interface Example {
input: string,
}
const SomeComponent = ({ input }: Example) => { ... }
export default SomeComponent; and the mdx-story containing this jsx <Preview>
<Story>
<SomeComponent input={false} />
</Story>
</Preview> We would like for this faulty input type to be noticed. |
Please provide a minimal runnable reproduction, otherwise I can't offer any help. |
Thanks @JounQin! I'll try to set up a minimal runnable reproduction tomorrow. |
@JounQin |
Then a custom TypeScript transformer plugin is required AFAIK. |
This leads to errors all the time with people using for example
disabled="false"
, which would evaluate todisabled
because the string "false" is a truthy value.If TypeScript looks over the
.mdx
files and makes sure the proper types are used, we avoid this.The text was updated successfully, but these errors were encountered: