main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
619 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var ReflectMetadataModule = require('../internals/reflect-metadata');
|
---|
4 | var anObject = require('../internals/an-object');
|
---|
5 |
|
---|
6 | var toMetadataKey = ReflectMetadataModule.toKey;
|
---|
7 | var ordinaryDefineOwnMetadata = ReflectMetadataModule.set;
|
---|
8 |
|
---|
9 | // `Reflect.metadata` method
|
---|
10 | // https://github.com/rbuckton/reflect-metadata
|
---|
11 | $({ target: 'Reflect', stat: true }, {
|
---|
12 | metadata: function metadata(metadataKey, metadataValue) {
|
---|
13 | return function decorator(target, key) {
|
---|
14 | ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetadataKey(key));
|
---|
15 | };
|
---|
16 | }
|
---|
17 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.