compiler-plugin / arrow.meta.quotes.nameddeclaration.stub.typeparameterlistowner / TypeAlias / <init>
TypeAlias(value: KtTypeAlias, descriptor: TypeAliasDescriptor?, name: Name? = value.nameAsName, type:
TypeReference
= TypeReference(value.getTypeReference()))
typeAlias(“”“$name”””, (typeParameters)
.toStringList() , “”“$type”””)
A template destructuring Scope for a KtTypeAlias.
*
import arrow.meta.Meta import arrow.meta.CliPlugin import arrow.meta.invoke import arrow.meta.quotes.Transform import arrow.meta.quotes.typeAlias
val Meta.reformatTypeAlias: CliPlugin
get() =
“Reformat Type Alias” {
typeAlias(this, { true }) { typeParameterListOwner ->
Transform.replace(
replacing = typeParameterListOwner,
newDeclaration = typeAlias(“”“$name”””, (typeParameters)
.toStringList() , “”“$type”””)
)
}
)
}
Do you like Arrow?
✖