Boolean: Represents a true or false value.
Number: Represents both integer and floating-point numbers.
String: Represents a sequence of characters.
Array: Represents a collection of elements of the same type.
Tuple: Represents an array with a fixed number of elements whose types are known.
Enum: Represents a group of named constant values.
Any: A type that allows any value. Useful when the type of a variable is unknown.
Void: Represents the absence of any type, commonly used as the return type of functions that do not return a value
Null and Undefined: Represents the absence of a value.
Never: Represents the type of values that never occur. Used as the return type for functions that always throw an error or never return.
Object: Represents a non-primitive type, i.e., anything that is not number, string, boolean, symbol, null, or undefined.
Unknown: Represents any value, similar to any, but safer because you can't perform operations on an unknown type without first asserting or narrowing it to a more specific type.
Tune in for AWS Security LIVE!
Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Symbols are a primitive type, not an object. Also, does TypeScript not support BigInt? Or have you forgotten that?