333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
{"version":3,"sources":["../browser/src/decorator/listeners/BeforeUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AAG3E;;GAEG;AACH,MAAM,UAAU,YAAY;IACxB,OAAO,UAAU,MAAc,EAAE,YAAoB;QAEjD,sBAAsB,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC;YAC1C,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,kBAAkB,CAAC,aAAa;SACX,CAAC,CAAC;IACrC,CAAC,CAAC;AACN,CAAC","file":"BeforeUpdate.js","sourcesContent":["import {getMetadataArgsStorage} from \"../../\";\nimport {EventListenerTypes} from \"../../metadata/types/EventListenerTypes\";\nimport {EntityListenerMetadataArgs} from \"../../metadata-args/EntityListenerMetadataArgs\";\n\n/**\n * Calls a method on which this decorator is applied before this entity update.\n */\nexport function BeforeUpdate() {\n    return function (object: Object, propertyName: string) {\n\n        getMetadataArgsStorage().entityListeners.push({\n            target: object.constructor,\n            propertyName: propertyName,\n            type: EventListenerTypes.BEFORE_UPDATE\n        } as EntityListenerMetadataArgs);\n    };\n}"],"sourceRoot":"../.."}