Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_nest/mod.ts>Reflector#get

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
method Reflector.prototype.get
import { Reflector } from "https://deno.land/x/deno_nest@v3.4.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