Companion

object Companion

Properties

Link copied to clipboard
const val ARROW_FUNCTION: Int = 4
Link copied to clipboard
const val FUNCTION_EXPRESSION: Int = 2

A function expression is a function appearing in an expression.

Link copied to clipboard

A function expression that is the top-level expression of an expression statement.

Link copied to clipboard
const val FUNCTION_STATEMENT: Int = 1

A function statement is a function appearing as a top-level statement, not nested inside some other statement, in either a script or a function.

Functions

Link copied to clipboard

Calculates the arity (function.length). Per spec the length property counts only the parameters before the first one with a default value, and rest parameters do not count at all.