Using typescript checker only with VSCode on a javascript React project with a jsconfig.json I will need disable/bypass some typescript checks like missing property on objects and omited props.
for Example:
const Comp = ({ color, center, dark }) => <div> /* real code here */ </div>
<Comp color="blue" /> // TS check complaint on missing property: ts 2739
I would like to be able to use some TS check and disable others.
I try, without luck:
// global.d.ts
declare global {
namespace JSX {
type Element = string;
interface ElementAttributesProperty {
}
}
}
centeranddarkare optional? Or are you in a hurry and you don't want to write types? (In the latter case, perhaps you could write a.jsxfile instead of a.tsxfile.) Another option is to use//@ts-ignore.js