| slug | introducing-t-ruby | |
|---|---|---|
| title | Introducing T-Ruby | |
| authors |
|
|
| tags |
|
We're excited to introduce T-Ruby, a TypeScript-style static type system for Ruby.
T-Ruby brings the familiar TypeScript development experience to Ruby developers, allowing you to add type annotations directly in your code and catch type errors before runtime.
- TypeScript-style syntax: Familiar type annotation syntax for TypeScript developers
- Gradual typing: Add types incrementally to your existing Ruby codebase
- RBS generation: Automatically generate
.rbssignature files - Zero runtime overhead: Types are stripped at compile time
Install T-Ruby and start adding types to your Ruby code:
gem install t-rubyCreate your first .trb file:
def greet(name: String): String
"Hello, #{name}!"
endCompile to Ruby:
trc greet.trbCheck out our documentation to learn more!