Export user defined types in Basic Macro

I created a set of custom types in the Types module and want to use them in my library in other modules. How can i do this?

Public sets the type visibility in the library, if I understand correctly, but I cannot use them in other modules of my library.

I tried doing this in other modules:

Dim test = As new Types.Field
REM Or
Dim test = As new Field

but it causes an error

Module Test:

Option Explicit
Option Compatible

Public Enum FieldType
    Text = "Text"
    Numeric = "Numeric"
    Date = "Date"
End Enum

REM declaration Field type
Public Type Conditional
    Accept As String
    Data As String

    SkipEmptyCells As Boolean

    Minimum As Integer
    Maximum As Integer

    ShowSelectedList As Boolean
    SortItemsByAsc As Boolean
    Elements As String

    Formula As String
End Type

Public Type Help
    Header As String
    Tip As String
    ShowOnSelectCell As Boolean
End Type

Public Type OnError 
    Hide As Boolean
    Action As String
    Header As String
    Message As String
End Type

Public Type Validity 
    Conditional As Conditional
    Help As Help
    OnError As OnError
End Type

REM Metadata of Field 
Public Type FieldMetadata
    TechName As String
    Validity As Validity
End Type

REM Advanced
Public Type Field
    _Name As String
    TechName As String
    DefaultValue As Integer
    Row As Integer
    Column As String
    Remark As String
    Length As Integer
    FieldType As FieldType

    Metadata As FieldMetadata
End Type

I only tried it in a very simple case experimentally and cannot instruct you concerning details, but it might be something useful to you:
https://help.libreoffice.org/6.4/he/text/sbasic/shared/classmodule.html

You cannot export custom types, you can only create functions to get new instances of types in the module where their declarations are located, and access them already (like Types.CreateField(…)), then it works:

Function CreateField(...)
    Dim temp = as new Field
    ...
    CreateField = temp 
End Function