None of the points you've mentioned there are points against using typescript. I would argue there isn't a single project that you shouldn't use Typescript on. Even if you just add a bare minimum non-strict tsconfig and use no explicit types at all it's basically javascript but safer. You can't be bothered by thinking about what your function arguments types should be? Just use any and go the js way. But don't complain when half your codebase catches fire in 2 months after you decide to do a seemingly unrelated refactor.
would you use Typescript if an important library you will be using has no type definition files?
do you think it is worth writing type definition files down yourself?
are you sure that using any over and over again will not have any negative consequences or create a false sense of security for a development team that uses Typescript?
any is only useful when you are stuck in something that does not have type defs and also when you are working with some javascript library that does not have any types. also note that i wrote starting out with loose typescript configuration and make it strict along the way.
Not even for that. You shouldn't use any at all and use unknown and never instead. I've used any as an example for someone who doesn't really want to use typescript.
None of the points you've mentioned there are points against using typescript. I would argue there isn't a single project that you shouldn't use Typescript on. Even if you just add a bare minimum non-strict tsconfig and use no explicit types at all it's basically javascript but safer. You can't be bothered by thinking about what your function arguments types should be? Just use
any
and go the js way. But don't complain when half your codebase catches fire in 2 months after you decide to do a seemingly unrelated refactor.Let me ask you questions:
any
over and over again will not have any negative consequences or create a false sense of security for a development team that uses Typescript?any
is only useful when you are stuck in something that does not have type defs and also when you are working with some javascript library that does not have any types. also note that i wrote starting out with loose typescript configuration and make it strict along the way.Not even for that. You shouldn't use
any
at all and useunknown
andnever
instead. I've usedany
as an example for someone who doesn't really want to use typescript.i 100% agree that
any
is the troublemaker and we should be usingnever
&unknown
.