I'm working with the Esprima parser, it outputs an AST format which is compatible with the Mozilla Spider Monkey Parser API.
In the Mozilla Docs, it specifies the Function
node as:
interface Function <: Node {
id: Identifier | null;
params: [ Pattern ];
defaults: [ Expression ];
rest: Identifier | null;
body: BlockStatement | Expression;
generator: boolean;
expression: boolean;
}
What will the defaults
property contain? It always appears as just an empty array.