I'm a seasoned Java dev who needs to port a Java app for web use and I've been considering using Typescript to do this. For the time being, I'd like to keep the traditional Java style of packages being a hierarchy of folders and a single class per "leaf" file.
I've been looking at the Typescript docs and I see things like ../path/to/module
. Are all includes relative like that? Is there some kind of base directory option where I can get something akin to import com.ancient.java.MyType;
?
Also, is declaring a package com.ancient.java;
something to be done in Typescript?
I've looked over the docs but I'm not finding them easy to read with all the talk about internal and external namespaces and exporting, etc.
Can someone boil this down to something that'll feel like Java for me to start out with? I'm sure I'll baby step into all the complex stuff later as needed. What does this look like in code?