Represents signatures of executable code.

Constraints of overloaded functions:

  • no duplicated variants!
  • The names of all paramaters don't matter for functions to be unique.
  • a variant is uniquely identified by: function name (if available), types of input parameters; options.identifierPrefix
  • For overloaded functions, it is not enough to have different output types or different parameter names!

TODO possible Extensions:

  • multiple output parameters
  • create variants of this, e.g. functions, procedures, lambdas
  • (structural vs nominal typing? somehow realized by the three options above ...)
  • optional parameters
  • parameters which are used for output AND input

Implements

Constructors

Properties

$name: "FunctionKind"
mapNameTypes: Map<string, OverloadedFunctionDetails> = ...

Limitations

  • Works only, if function types are defined using the createFunctionType(...) function below!
options: Readonly<FunctionKindOptions>
services: TypirServices

Methods

  • Parameters

    • name: undefined | string
    • enforce: boolean

    Returns void

  • Parameters

    • name: undefined | string
    • enforce: boolean

    Returns void