Skip to main content

parse_type_annotation

Function parse_type_annotation 

Source
pub fn parse_type_annotation(
    s: &str,
    type_aliases: &HashMap<String, VarType>,
    resolved_imports: &HashMap<String, ImportedNamespace>,
) -> Result<VarType, String>
Expand description

Parses a type annotation string into a VarType.

ยงErrors

Returns an error string if the type annotation syntax is invalid or references an unknown type alias.