parsePrimitiveType Function

Tries to parse the given string as one of the 10 primitive types.

parsePrimitiveType(type: string): PrimitiveType | undefined

@returns A valid PrimitiveType if successfully parsed, or undefined if the provided string is not a valid PrimitiveType.

Parameter Type Description
type string The primitive type string to parse.

Returns - PrimitiveType | undefined

A valid PrimitiveType if successfully parsed, or undefined if the provided string is not a valid PrimitiveType.

Defined in

Last Updated: 17 December, 2024