Skip to content

Commit

Permalink
Add dispatch to deleteobj
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyt0313 committed Jul 28, 2023
1 parent 0f4c627 commit 0a1a8a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/decorators/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,11 @@ export function GenieClass(comment: string) {
};

target.DeleteObject = function (key: {}) {
genieDispatch(() => {
let obj = objects[target.name][key[target.prototype.genieKey]];
obj.__deleted = true;
return obj;
})
}
} else if (target.prototype instanceof HelperClass) {
target._createObject = function (...args: any[]){
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactgenie-dsl",
"version": "0.0.23",
"version": "0.0.24",
"description": "A natural language parser based on a large language model",
"scripts": {
"prepare": "peggy lib/dsl/parser.pegjs -o lib/dsl/parser.gen.js && tsc",
Expand Down

0 comments on commit 0a1a8a1

Please sign in to comment.