million icon indicating copy to clipboard operation
million copied to clipboard

About the type of getComponent, the second argument of the createChildren function

Open nojiritakeshi opened this issue 1 year ago • 4 comments

This is neither a bug nor a feature request, so I will ask in a blank issue.

Is it intended that the getComponent of the createChidren function in 'package/react' and 'package/preact' be of type any?

In the MillionArrayProps interface, children are defined as follows

children: (value: T, i: number) => ReactNode;.

And isn't the second argument of the createChildren function only passed the above children? Sorry if it is ANY type that was intended.

nojiritakeshi avatar Jun 18 '23 06:06 nojiritakeshi

@destroyer22719

aidenybai avatar Jun 18 '23 06:06 aidenybai

Hello, good timing. I'm currently a new contributor with the goal of improving the type safety of the million codebase, currently I am working on refactoring the code to remove the usage any type as it's bad practice, when I am done with my work the usage of the any will be minimal.

destroyer22719 avatar Jun 18 '23 15:06 destroyer22719

I'm currently a new contributor with the goal of improving the type safety of the million codebase, currently I am working on refactoring the code to remove the usage any type as it's bad practice, when I am done with my work the usage of the any will be minimal.

@destroyer22719 Oh! That's great! Is there anything I can do?

nojiritakeshi avatar Jun 18 '23 23:06 nojiritakeshi

I'm currently a new contributor with the goal of improving the type safety of the million codebase, currently I am working on refactoring the code to remove the usage any type as it's bad practice, when I am done with my work the usage of the any will be minimal.

@destroyer22719 Oh! That's great! Is there anything I can do?

Yeah, sure! You can join the server and come have fun with us.

million.dev/chat

tobySolutions avatar Jun 20 '23 05:06 tobySolutions

Hello,

I created a PR that addressed your concerns #464

destroyer22719 avatar Jun 30 '23 01:06 destroyer22719

@destroyer22719 good job! Thanks to #464, this issue will be resolved and closed.

nojiritakeshi avatar Jun 30 '23 14:06 nojiritakeshi