Function 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.

Prototype

string[] getRequiredImports(I)();

Parameters

NameDescription
I interface to inspect

Returns

list of module name strings, no duplicates

Example

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

Authors

Sönke Ludwig, Михаил Страшун

Copyright

© 2013 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.