nl_tokens: 4 . 1 . 2 Reflect . metadata ( metadataKey metadataValue ) https : // rbuckton . github . io / reflect - metadata / #reflect . metadata A default metadata decorator factory that can be used on a class class member or parameter . @param metadataKey The key for the metadata entry . @param metadataValue The value for the metadata entry . @returns A decorator function . @remarks If metadataKey is already defined for the target and target key the metadataValue for that key will be overwritten . @example
pl_tokens: function metadata ( metadataKey , metadataValue ) { function decorator ( target , propertyKey ) { if ( ! IsObject ( target ) ) throw <mask> TypeError ( ) ; if ( ! IsUndefined ( propertyKey ) && ! IsPropertyKey ( propertyKey ) ) throw new TypeError ( ) ; OrdinaryDefineOwnMetadata ( metadataKey , metadataValue , target , propertyKey ) ; } return decorator ; }