3 ms·
> using plain strings, what happens when you do a typo? The tests fails > Will your app will silently break or you’ll have a compile time error? There is no
by mickael-kerjean 1y ago
> using plain strings, what happens when you do a typo?
The tests fails
> Will your app will silently break or you’ll have a compile time error?
There is no silent error. In practice, there are a couple fail safes:
- using both eslint and tsc: https://github.com/mickael-kerjean/filestash/blob/master/public/package.json#L8-L9 https://github.com/mickael-kerjean/filestash/blob/master/pub...
- the code is full of runtime assertions: https://github.com/mickael-kerjean/filestash/blob/1d1bad001b5e34f9712ee86412cf2c149a291efb/public/assets/lib/assert.js#L4 https://github.com/mickael-kerjean/filestash/blob/1d1bad001b...
- unhandled error (like most assertion) will interrupt everything to show a scary looking screen: https://github.com/mickael-kerjean/filestash/blob/1d1bad001b5e34f9712ee86412cf2c149a291efb/public/assets/boot/ctrl_boot_frontoffice.js#L53-L54 https://github.com/mickael-kerjean/filestash/blob/1d1bad001b...
- controlled error which are part of the regular error handling will stop the flow showing a screen like this: https://demo.filestash.app/?error=test https://demo.filestash.app/?error=test