Do typealiases persist after compilation?
# announcements
s
Do typealiases persist after compilation?
s
🚫 https://kotlinlang.org/docs/reference/type-aliases.html
Type aliases do not introduce new types. They are equivalent to the corresponding underlying types.
s
I meant if Im able to utilize them in a library I design
Will the typealias be available for projects depending on this library, or do they only exist in one project
k
As far as I know, the answer is yes. Type aliases are packed into the Kotlin Metadata that is shipped in the class files, and annotations on aliases cause a stub method, "<alias-name>$annotations" to be included as well, precisely for the purpose of persisting across compilation units.
1