Skip to content

Commit

Permalink
Add docs for Ruby type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniosarosi committed Dec 18, 2024
1 parent 39141cb commit 401a97d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/language_client_codegen/src/ruby/field_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ impl ToRuby for FieldType {
match self {
FieldType::Class(name) => format!("Baml::Types::{}", name.clone()),
FieldType::Enum(name) => format!("T.any(Baml::Types::{}, String)", name.clone()),
// TODO: Can we define recursive aliases in Ruby with Sorbet?
// Sorbet does not support recursive type aliases.
// https://sorbet.org/docs/type-aliases
FieldType::RecursiveTypeAlias(_name) => "T.anything".to_string(),
// TODO: Temporary solution until we figure out Ruby literals.
FieldType::Literal(value) => value.literal_base_type().to_ruby(),
Expand Down

0 comments on commit 401a97d

Please sign in to comment.