Describe the bug
I can not find the right strategy to work with visibility filters.
Below are some examples.
Please explain how to cope with.
TIA
Reproduction
Example 1:
using Reflection;
model Foo {
id: string,
parent_id: Foo.id,
parent: Foo,
}
// NB: FilterVisibility _does require_ the name argument
alias GuessReadType<Type extends Model> = FilterVisibility<Type, #{ all: #[Lifecycle.Read] }, "{name}Read">;
// Duplicate type name: 'FooRead'
model FooRead is GuessReadType<Foo> {}
Example 2:
using Reflection;
// Duplicate type name: 'Foo'
model Foo {
id: string,
parent_id: Foo.id,
parent: Foo,
}
// NB: FilterVisibility _does require_ the name argument
alias GuessReadType<Type extends Model> = FilterVisibility<Type, #{ all: #[Lifecycle.Read] }, "">;
model FooRead is GuessReadType<Foo> {}
Checklist
Describe the bug
I can not find the right strategy to work with visibility filters.
Below are some examples.
Please explain how to cope with.
TIA
Reproduction
Example 1:
Example 2:
Checklist