TypeScript errors in Plain English

TypeScript Error Translator

Error #4

Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<GProps, any, any>> & Readonly<GProps>'.

Translation

You're trying to access children on an object that doesn't contain it.

Explanation

TODO

Error #3

Type '{ children: Element[]; key: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<GProps, any, any>> & Readonly<GProps>'.

Translation

I was expecting a type matching A, but instead you passed B.

Explanation

You can assign variables types to give me hints about what kind of types you want to allow in that variable. For instance:

const num: number = 0;

This tells me that num will always be a number.

But sometimes, you'll break that pact you made with me. For instance:

const num: number = 'some string';

In your case, you said that this type was the only thing assignable to that variable:

IntrinsicAttributes & IntrinsicClassAttributes<Component<GProps, any, any>> & Readonly<GProps>

And you passed me this instead:

{ children: Element[]; key: number; }

Error #2

Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<TextProps, any, any>> & Readonly<TextProps>'.

Translation

You're trying to access children on an object that doesn't contain it.

Explanation

TODO

Error #1

Type '{ children: number; x: number; y: number; textAnchor: "end"; fill: string; fontSize: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<TextProps, any, any>> & Readonly<TextProps>'.

Translation

I was expecting a type matching A, but instead you passed B.

Explanation

You can assign variables types to give me hints about what kind of types you want to allow in that variable. For instance:

const num: number = 0;

This tells me that num will always be a number.

But sometimes, you'll break that pact you made with me. For instance:

const num: number = 'some string';

In your case, you said that this type was the only thing assignable to that variable:

IntrinsicAttributes & IntrinsicClassAttributes<Component<TextProps, any, any>> & Readonly<TextProps>

And you passed me this instead:

{ children: number; x: number; y: number; textAnchor: "end"; fill: string; fontSize: string; }