mips icon indicating copy to clipboard operation
mips copied to clipboard

Multiple TS2564 (Property has no initializer) errors

Open mikaelmello opened this issue 7 years ago • 4 comments

A lot of "Property '' has no initializer and is not definitely assigned in the constructor." when running the build command.

This is a new issue coming along with the latest TypeScript version (2.7), more can be read here:

https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#stricter-class-property-checks

I'd make a pull request to fix but I don't know if you want to deactivate this check or manually assign all variables that have this error, if it is the latter, still don't know how you'd want to initialize most of them.

mikaelmello avatar Mar 02 '18 08:03 mikaelmello

Thanks for bringing this up, will look into it!

nickpisacane avatar Mar 03 '18 01:03 nickpisacane

I can try to infer the default values by analyzing how they are used when first defined and define them at the constructor.

It will also help me understand the codebase for future contributions

mikaelmello avatar Mar 07 '18 13:03 mikaelmello

Thanks, any help is appreciated! I plan to look into this in the next couple of days, but one of my other priorities is adding full Floating-Point support.

nickpisacane avatar Mar 08 '18 17:03 nickpisacane

@MikaelMello Just started a new branch floating-point to start adding FP support on. While working, I noticed what you mean about the new TypeScript initializer errors. Those fixes would definitely require a bit of context about the code-base. I will definitely get to them, so don't feel pressured. Thanks!

nickpisacane avatar Mar 09 '18 00:03 nickpisacane