refactor: remove autobind-decorator dep

This commit is contained in:
syuilo
2023-03-31 16:41:27 +09:00
parent 9bc5d52e41
commit 152247bfda
8 changed files with 35 additions and 59 deletions

View File

@@ -2,7 +2,6 @@
* Hpml
*/
import autobind from 'autobind-decorator';
import { Hpml } from './evaluator';
import { funcDefs } from './lib';
@@ -61,7 +60,6 @@ export class HpmlScope {
this.name = name ?? 'anonymous';
}
@autobind
public createChildScope(states: Record<string, any>, name?: HpmlScope['name']): HpmlScope {
const layer = [states, ...this.layerdStates];
return new HpmlScope(layer, name);
@@ -71,7 +69,6 @@ export class HpmlScope {
* 指定した名前の変数の値を取得します
* @param name 変数名
*/
@autobind
public getState(name: string): any {
for (const later of this.layerdStates) {
const state = later[name];