You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli/commands.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@ title: Commands
4
4
description: trc CLI commands reference
5
5
---
6
6
7
+
<DocsBadge />
8
+
9
+
7
10
# Commands
8
11
9
12
The `trc` command-line interface is the primary tool for working with T-Ruby. It compiles `.trb` files to Ruby, type-checks your code, and generates RBS signatures.
Copy file name to clipboardExpand all lines: docs/cli/compiler-options.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@ title: Compiler Options
4
4
description: All available compiler options
5
5
---
6
6
7
+
<DocsBadge />
8
+
9
+
7
10
# Compiler Options
8
11
9
12
T-Ruby's compiler provides extensive options to control compilation, type checking, and code generation. This reference covers all available command-line flags and their effects.
Copy file name to clipboardExpand all lines: docs/cli/configuration.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@ title: Configuration
4
4
description: T-Ruby configuration file reference
5
5
---
6
6
7
+
<DocsBadge />
8
+
9
+
7
10
# Configuration
8
11
9
12
T-Ruby uses a `trc.yaml` file to configure compiler behavior, source files, output locations, and type checking rules. This reference covers all available configuration options.
Copy file name to clipboardExpand all lines: docs/introduction/t-ruby-vs-others.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@ title: T-Ruby vs Others
4
4
description: Comparison of T-Ruby with TypeScript, RBS, and Sorbet
5
5
---
6
6
7
+
<DocsBadge />
8
+
9
+
7
10
# T-Ruby vs Others
8
11
9
12
The Ruby ecosystem has several approaches to static typing. This page compares T-Ruby with other solutions to help you understand where T-Ruby fits in.
@@ -41,7 +44,7 @@ class User
41
44
end
42
45
```
43
46
44
-
```ruby title="sig/user.rbs"
47
+
```rbs title="sig/user.rbs"
45
48
class User
46
49
@name: String
47
50
@age: Integer
@@ -55,7 +58,7 @@ end
55
58
56
59
Types are written inline:
57
60
58
-
```ruby title="lib/user.trb"
61
+
```trb title="lib/user.trb"
59
62
class User
60
63
@name: String
61
64
@age: Integer
@@ -119,7 +122,7 @@ end
119
122
120
123
### T-Ruby Approach
121
124
122
-
```ruby title="lib/calculator.trb"
125
+
```trb title="lib/calculator.trb"
123
126
class Calculator
124
127
def add(a: Integer, b: Integer): Integer
125
128
a + b
@@ -153,7 +156,7 @@ greet(123) # Raises TypeError at runtime if runtime checks enabled
0 commit comments