Skip to main content
Module

x/oak_nest/mod.ts>Reflector#get

Refer to nestjs to realize some common functions for Deno
Go to Latest
method Reflector.prototype.get
import { Reflector } from "https://deno.land/x/oak_nest@v1.13.16/mod.ts";

Retrieve metadata for a specified key for a specified target.

Examples

const roles = this.reflector.get<string[]>('roles', context);

Parameters

metadataKey: string

lookup key for metadata to retrieve

context: Context

context (decorated object) to retrieve metadata from