I come from a Java / Kotlin background and TS is totally fine.
I would have gone with C# or Kotlin if I had the luxury of choice, but I'll get that with a deliberate career move maybe.
That way you can define the type in a single place, have runtime validation for that type, but also be able to use the type in typescript at compile time.