When Partial<T> is used on a subinterface, both the child and the parent interface get a proper -Partial variant generated.
However, if the parent interface comes from a different file, no -Partial variant is generated for it:
interface Parent {
var parentProp: String
}
// no ParentPartial interface here
And:
interface Child : Parent {
var childProp: String
}
// ParentPartial used here but not declared anywhere (and not imported)
external interface ChildPartial : ParentPartial {
var childProp: String?
get() = definedExternally
set(value) = definedExternally
}
external open class MyClass {
open var partialProp: ChildPartial
}
When
Partial<T>
is used on a subinterface, both the child and the parent interface get a proper-Partial
variant generated. However, if the parent interface comes from a different file, no-Partial
variant is generated for it:parent.ts
:child.ts
:Generated:
And:
This was noticed in version
0.5.8-rc.0
of Dukat.