3 ms·
There seems to be a lot of people finding that they have to use the "any" escape hatch quite frequently. Our team has found we practically never use this anymor
by foo42 6y ago
There seems to be a lot of people finding that they have to use the "any" escape hatch quite frequently. Our team has found we practically never use this anymore since starting to use tools such as "zod" to simply and quickly define schemas for input data, such as JSON, which we can then use to parse/validate untyped data into typed data to satisfy both the compiler, and us, that the data is the shape we expect.
If you can find ways to avoid the escape hatches you can then get the compiler to carry more weight and trust in the types without blowback.