JackNytely
banner
jacknytely.com
JackNytely
@jacknytely.com
I love streaming, gaming, and coding.
Software Engineer @ NaggingPanda.com
Livestream @ twitch.tv/JackNytely
And now if we ever have a small change or issue with one of the interfaces or enums, we no longer need to look through 1 file of 100 lines of code, we can now find it in the file structure, change it, and it will be fixed throughout our entire application.

example of using the Types in our app:
November 24, 2024 at 2:07 PM
Now we finally need to edit our /types/types.ts file to centralize all our split interfaces and enums to make it easier to access in our app:
November 24, 2024 at 2:00 PM
But now we need a centralized way to get these types, as such we have this folder structure:
November 24, 2024 at 1:56 PM
Example 3/3:
November 24, 2024 at 1:47 PM
Example 2/3:
November 24, 2024 at 1:47 PM
However, our file is now really long, and this is commonly seen throughout big and small projects, I personally think that you should separate interfaces, types, enums, records, etc... into their own folders "/types/{interfaces, types, enums, records}" and in their own files. Example 1/3:
November 24, 2024 at 1:46 PM
The main problem here is that the Interface has nested interfaces within it, and this is generally not best practice, it is best to first separate all objects into their own interface or type to avoid nesting as seen in the following image:
November 24, 2024 at 1:27 PM