dbos-inc / dbos-transact

The TypeScript framework for backends that scale
https://docs.dbos.dev
MIT License
291 stars 20 forks source link

Reduce usage of "any" #448

Closed demetris-manikas closed 1 month ago

demetris-manikas commented 1 month ago

This PR aims to reduce the usage of any in the codebase

devhawk commented 1 month ago

@demetris-manikas I'm thinking we should also look at simplifying UserDatabase + UserDatabaseQuery + UserDatabaseTransaction types to define params/args parameters as unknown[] type instead of having a type argument T extends unknown[]. Thoughts?

demetris-manikas commented 1 month ago

Definitely. <T extends unknown[]> is kind of non-existent as a concept :)

Still it proved a non trivial change. Better do it in a separate PR

devhawk commented 1 month ago

@demetris-manikas I thought I had accidently marked this as draft and switched it back. Did you mean to switch this?

demetris-manikas commented 1 month ago

I converted this to daft cause after rebasing to the latest code it gives me some linting errors.

devhawk commented 1 month ago

OK I was going to merge but I'll wait for you to address the linter issues. Sorry for the confusion

devhawk commented 1 month ago

@demetris-manikas please let me know when you're ready for me to merge this

demetris-manikas commented 1 month ago

No problem. These things happen all the time

demetris-manikas commented 1 month ago

I updated the packages and the linting errors vanished. I get a warning though that the typescript version 5.4.5 is not officially supported from the linter but I guess you have all seen that. You can go ahead and merge

devhawk commented 1 month ago

I opened #458 to track updating the linter