--

Option #1 would be nice as TS compilation doesn't occur on the user's client, but there is a caveat: it feels magic. Without importing a file, someone who's not acquainted with the project (or the future you) would not know clearly where those structures come from.

Obviously this can be considered not a huge deal for most situations, but I still think that making explicit imports, even if they add some more bytes and a bit more typing, make for the most clarity.

--

--

Marcos Sandrini
Marcos Sandrini

Written by Marcos Sandrini

Designer and front-end programmer with 20+ years of experience, also a keen observer of the world and its people

No responses yet