From 401a97d178c7408353dbf2b61a78e263d881973e Mon Sep 17 00:00:00 2001 From: Antonio Sarosi Date: Wed, 18 Dec 2024 17:08:31 +0100 Subject: [PATCH] Add docs for Ruby type alias --- engine/language_client_codegen/src/ruby/field_type.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/language_client_codegen/src/ruby/field_type.rs b/engine/language_client_codegen/src/ruby/field_type.rs index 91e37e33e..c6cdba590 100644 --- a/engine/language_client_codegen/src/ruby/field_type.rs +++ b/engine/language_client_codegen/src/ruby/field_type.rs @@ -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(),