import { metadata } from '../constants' ; import { InjectTagIdentifier } from '../interfaces' ; export const Inject = ( token ) => ( target , key , index ? ) : void => { const tokens = Reflect . getMetadata ( metadata . INJECT_TOKEN_IDENTIFIER , target ) || [ ] ; const next = tokens . concat ( { name : token , index } ) ; Reflect . defineMetadata ( metadata . INJECT_TOKEN_IDENTIFIER , next , target , key ) ; } ;