solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Enable typescript strict mode

Open milomg opened this issue 3 years ago • 6 comments

There are a couple of types that have an optional undefined, enabling strict mode will help with handling them (also it will make sure that users of solid-start with strict mode enabled don't get those errors in their project)

milomg avatar Jun 18 '22 20:06 milomg

Could you point out the specific ones so we could deal with them? Or make a PR?

nksaraf avatar Jun 18 '22 23:06 nksaraf

Sure, I'll make a PR to use Typescript's ?. operator

milomg avatar Jun 19 '22 02:06 milomg

I guess we are in good versions of node to do that. I have been avoiding ?. and ?? as it tends to break some tooling.

ryansolid avatar Jun 19 '22 02:06 ryansolid

Update: when I enable strict mode [here](https://github.com/solidjs/solid-start/blob/main/packages/start/tsconfig.json], I get ~300 errors from tsc --noEmit. I've cut that down to about 56 that I'm manually working through

milomg avatar Jun 19 '22 04:06 milomg

@modderme123 could you make a PR for what you have! I can work on top to get it to completion for strict mode

nksaraf avatar Aug 22 '22 23:08 nksaraf

Just got back to this and after rebasing, it looks like you've got most of the initial errors. Only 2 files had any changes that still were valid for the current codebase and they'd be trivial to recreate

milomg avatar Aug 29 '22 05:08 milomg

Technically we have enabled strict mode now. This won't help people with their own ts configs etc.. as there is a different enhancement for that. But I consider this done.

ryansolid avatar Mar 08 '24 18:03 ryansolid