I have been testing a new PowerShell module locally, which has several functions and a couple of custom TypeDefinitions that are consumed by other modules.
One type I define is for the Verbosity:
Add-Type -TypeDefinition @"
public enum CommonLogVerbosityLevel
{
Normal,
Detailed
}
"@
I am able to use the type by using Import-Module
, however I want this to autoload (like the functions) once the module is installed. If I don't it errors saying that it cannot find the type.
The test manifest exposes all the functions, but I have defined a stricter manifest for the released version as some functions and types are really only for internal use, so I don't want to expose those when I released the module.
Do I need to add the type to the manifest or find a different way to expose the type? Ideally I would like to know if the manifest can handle this.