compiler-plugin / arrow.meta.quotes.nameddeclaration.stub.typeparameterlistowner / TypeAlias

TypeAlias

class TypeAlias : TypeParameterListOwner<KtTypeAlias, TypeAliasDescriptor>

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”””) ) } ) }

Constructors

<init> typeAlias(“”“$name”””, (typeParameters).toStringList() , “”“$type”””)TypeAlias(value: KtTypeAlias, descriptor: TypeAliasDescriptor?, name: Name? = value.nameAsName, type: TypeReference = TypeReference(value.getTypeReference()))

Properties

descriptor val descriptor: TypeAliasDescriptor?
name val name: Name?
type val type: TypeReference
value val value: KtTypeAlias

Functions

identity fun ElementScope.identity(descriptor: TypeAliasDescriptor?): TypeAlias

Extension Functions

map fun <K : KtElement> Scope<K>.map(f: (K) -> K): Scope<K>
orEmpty fun <K : KtElement> Scope<K>?.orEmpty(): Scope<K>

Do you like Arrow?

Arrow Org
<