It seems that Type.AllReferencedTypes ignores nullable reference types.
Here is what I'm trying to do:
Template:
for class in data.Classes | Symbols.WhereNameEndsWith "TestDTO"
capture output
for type in class | Type.AllReferencedTypes | Array.Uniq -}}
import { {{ type }} } from './{{ type.BareName }}';
{{ end
end
Save output "test_output"
end
Class to transform:
public class TestDTO
{
public SomeOtherClass? TestProp1 { get; set; }
}
In the output, no line is present when TestProp1 is nullable.
I would expect to see:
import { SomeOtherClass } from './SomeOtherClass':
Otherwise, thanks for your work. I used Typewriter a few years ago and NTypewriter is a huge improvement!
Hi,
It seems that Type.AllReferencedTypes ignores nullable reference types.
Here is what I'm trying to do:
Template:
Class to transform:
In the output, no line is present when TestProp1 is nullable. I would expect to see:
Otherwise, thanks for your work. I used Typewriter a few years ago and NTypewriter is a huge improvement!