https://kotlinlang.org logo
#android
Title
# android
a

Alex

03/27/2023, 11:34 AM
Is there a way to create a
typealias
but for a
static class / object
? What I want to do is to create a typealias for
[package].R.string
. Something like
objectalias [package].R.string = Texts
I know that I could create an import alias (aka
import [package].R.string as Texts
but this would prevent simple autoimports for cases where a dev in our team writes
<http://Texts.xxx|Texts.xxx>
, we would have to copy the import alias manually or create some sort of readme or CI checks for that.
8 Views