Hi, is there an idiomatic way to wrap/format an ex...
# ktlint
a
Hi, is there an idiomatic way to wrap/format an extension function with a long name and no arguments? For example:
Copy code
fun Validated<Nel<Violation>, Field<List<MyReallyLongObjectTypeName>>>.validate(): Validated<Nel<Violation>, Field<List<MyOtherReallyLongObjectTypeName>>> {
Most places cause a violation with ktlint, I'm wondering if a suppression for it is the best option for readability.
j
Consider a type alias? 😆
a
haha, yeah perhaps I can try doing that
t
something like this probably should work:
Copy code
Validated<
    Nel<Violation>,
    Field<
        List<
            MyOtherReallyLongObjectTypeName
        >
    >
>
But yeah - better to introduce typealias
j
In Civ 5 Narrator Voice: @tapchicoma has completed the Great Pyramid of Generics
🧌 1