@nestjs/mongoose
Version:
Nest - modern, fast, powerful node.js web framework (@mongoose)
14 lines • 519 B
JavaScript
import { TypeMetadataStorage } from '../storages/type-metadata.storage.js';
export function Virtual(options) {
return (target, propertyKey) => {
TypeMetadataStorage.addVirtualMetadata({
target: target.constructor,
options: options?.options,
name: propertyKey.toString() +
(options?.subPath ? `.${options.subPath}` : ''),
setter: options?.set,
getter: options?.get,
});
};
}
//# sourceMappingURL=virtual.decorator.js.map