Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.14.0/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