getRequiredImports

For a given interface I finds all modules that types in its methods come from.

These modules need to be imported in the scope code generated from I is used to avoid errors with unresolved symbols for user types.

string[]
getRequiredImports
(
I
)
()
if (
is(I == interface)
)

Parameters

I

interface to inspect

Return Value

Type: string[]

list of module name strings, no duplicates

Examples

// `Test` is an interface using single user type
enum imports = getRequiredImports!TestInterface;
static assert (imports.length == 1);
static assert (imports[0] == "vson.meta.codegen");

Meta