I know it’s a bit late, but I’m curious what you’d...
# ksp
z
I know it’s a bit late, but I’m curious what you’d think of an alternative approach for that new API Right now it’s this
Copy code
fun asMemberOf(
    property: KSPropertyDeclaration,
    containing: KSType
): KSType
Which feels a little java-y. What about this?
Copy code
fun KSPropertyDeclaration.asMemberOf(
    containing: KSType,
    resolver: Resolver
): KSType
t
Sounds good.
resolver
can probably be eliminated as well. What do you think @yigit?
y
hey sorry i was not following kotiln slack. I like the idea, in fact that is what the Room's internal API looks like as well (
foo.asMemberOf(type)
) though in Room, we pass the resolver around in the abstraction so caller does not need to provide. we don't do that in KSP yet but maybe we should because we have some internal static access to the resolver.
then it can be
property.asMemberOf(type)
t
Cool, here is the tracker: https://github.com/google/ksp/issues/208