Skip to content

⬅️ Back to Table of Contents

📄 spec.ts

📊 Analysis Summary

Metric Count
📦 Imports 4
📐 Interfaces 3
📑 Type Aliases 1

📚 Table of Contents

🛠️ File Location:

📂 packages/ast-spec/src/declaration/FunctionDeclaration/spec.ts

📦 Imports

Name Source
AST_NODE_TYPES ../../ast-node-types
FunctionBase ../../base/FunctionBase
Identifier ../../expression/Identifier/spec
BlockStatement ../../statement/BlockStatement/spec

Interfaces

FunctionDeclarationBase

Interface Code
interface FunctionDeclarationBase extends FunctionBase {
  type: AST_NODE_TYPES.FunctionDeclaration;
  body: BlockStatement;
  declare: false;
  expression: false;
}

Properties

Name Type Optional Description
type AST_NODE_TYPES.FunctionDeclaration
body BlockStatement
declare false
expression false

FunctionDeclarationWithName

Interface Code
export interface FunctionDeclarationWithName extends FunctionDeclarationBase {
  id: Identifier;
}

Properties

Name Type Optional Description
id Identifier

FunctionDeclarationWithOptionalName

Interface Code
export interface FunctionDeclarationWithOptionalName
  extends FunctionDeclarationBase {
  id: Identifier | null;
}

Properties

Name Type Optional Description
id Identifier | null

Type Aliases

FunctionDeclaration

type FunctionDeclaration = | FunctionDeclarationWithName
  | FunctionDeclarationWithOptionalName;