From 55ea8e5fd8d2f5bee4a7cd0ea5d167a668185fcd Mon Sep 17 00:00:00 2001 From: Thomas Genin Date: Sun, 1 Dec 2024 21:53:49 -0800 Subject: [PATCH] Extend node instead of statement --- src/ast/propertyhook.js | 8 ++++---- types.d.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ast/propertyhook.js b/src/ast/propertyhook.js index a9628252..8ff8a4ea 100644 --- a/src/ast/propertyhook.js +++ b/src/ast/propertyhook.js @@ -5,7 +5,7 @@ */ "use strict"; -const Statement = require("./statement"); +const Node = require("./node"); const KIND = "propertyhook"; /** @@ -13,17 +13,17 @@ const KIND = "propertyhook"; * * @constructor PropertyHook * @memberOf module:php-parser - * @extends {Statement} + * @extends {Node} * @property {string} name * @property {Boolean} isFinal * @property {Boolean} byref * @property {Parameter|null} parameter * @property {Block|Statement} body */ -module.exports = Statement.extends( +module.exports = Node.extends( KIND, function PropertyHook(name, isFinal, byref, parameter, body, docs, location) { - Statement.apply(this, [KIND, docs, location]); + Node.apply(this, [KIND, docs, location]); this.name = name; this.byref = byref; this.parameter = parameter; diff --git a/types.d.ts b/types.d.ts index 4386c2b1..bc91586d 100644 --- a/types.d.ts +++ b/types.d.ts @@ -780,7 +780,7 @@ declare module "php-parser" { /** * Defines a class property hook getter & setter */ - class PropertyHook extends Statement { + class PropertyHook extends Node { name: string; isFinal: boolean; byref: boolean;