TypeScript will feel like coming home. After years of Ruby's duck typing -- where you discover a method doesn't exist at runtime, in production, on a Friday -- TypeScript catches it at compile time. It is the "convention over configuration" philosophy applied to types. You will wonder why you ever lived without it.
But here is the thing that will frustrate you: TypeScript's type system is Turing-complete. It is its own programming language layered on top of JavaScript. You can go absurdly deep -- conditional types, mapped types, template literal types, type-level programming that looks like Haskell. Do not go there yet. Start with interfaces, generics, and union types. That covers 95% of real-world code.
The JavaScript ecosystem moves at a pace that makes Rails look like a geological process. ES2015 reinvented the language. ES2020 added optional chaining and nullish coalescing. ES2023 added array grouping. Every year brings new syntax. This is disorienting if you come from a world where Ruby 3.0 was a multi-year event. The trick is to learn the fundamentals deeply and treat new syntax as sugar on top. The core has not changed since ES2015 -- everything since then is convenience.
One uncomfortable observation: the JavaScript community treats backwards compatibility differently than Ruby. Rails gives you deprecation warnings for two major versions. The JS ecosystem will mass-migrate to a new bundler, a new test runner, a new package manager, and leave the old one to rot. Webpack to Vite. Yarn to pnpm. Mocha to Jest to Vitest. This is the water you swim in now. Adaptability matters more than loyalty to any single tool.
Learn TypeScript properly. Do not use any as an escape hatch. That defeats the entire purpose.