Declaring protos
Import statements
Protos are usually created when importing libraries or external code.
Instantiable protos
Classes and structs are imported as protos. The constructor of a class or struct is therefore an instantiable proto.
Non-instantiable protos
Every other proto (fixed classes, libraries) are not instantiable. You can call methods and instantiate classes on non-instantiable protos.
Manually declaring protos
Protos as variables
One can declare variables with the datatype proto
. This is useful to create aliases for protos or pass protos to functions.
Last updated