Union Type

    Union Type (or)🔗

    TYML lets you accept one of multiple types when needed.

    /// Accept either an int or a string
    setting: int | string
    
    • In TOML
    # !tyml example.tyml
    setting = 100
    
    # !tyml example.tyml
    setting = "string"
    

    Both are valid.