All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 56s
11 lines
No EOL
404 B
TypeScript
11 lines
No EOL
404 B
TypeScript
import 'reflect-metadata';
|
|
|
|
/** Metadata key used to store the partition key of an entity */
|
|
export const PARTITION_KEY_META = Symbol('polyglot:partitionKey');
|
|
|
|
/** Marks a property as the partition key of the entity. */
|
|
export function PartitionKey(): PropertyDecorator {
|
|
return (target, propertyKey) => {
|
|
Reflect.defineMetadata(PARTITION_KEY_META, propertyKey, target.constructor);
|
|
};
|
|
} |