Thanks for the awesome library! Combined with your alba-inertia, it is making my recent Vue/Inertia/Rails project a type-safe breeze.
I did just run into a problem though, and that's with Alba's nested attribute feature:
class Activities::Templates::IndexResource
include Alba::Resource
include Alba::Inertia::Resource
include Typelizer::DSL
typelize :boolean
attribute test {|x| false}
nested_attribute :nested do
typelize :string
attribute test1 {|x| "hello"}
typelize :string
attribute test2 {|x| "world"}
end
end
This produces:
type ActivitiesTemplatesIndex = {
test: boolean;
nested: unknown;
}
Not sure exactly what I was expecting, but likely another type, similar to how typelizer handles traits.
Thanks for the awesome library! Combined with your alba-inertia, it is making my recent Vue/Inertia/Rails project a type-safe breeze.
I did just run into a problem though, and that's with Alba's nested attribute feature:
This produces:
Not sure exactly what I was expecting, but likely another type, similar to how typelizer handles traits.