{"id":16726271,"url":"https://github.com/cmd-johnson/deno-reflect-metadata","last_synced_at":"2025-09-12T18:09:57.010Z","repository":{"id":44335640,"uuid":"303937628","full_name":"cmd-johnson/deno-reflect-metadata","owner":"cmd-johnson","description":"A Deno-compatible copy of the TypeScript Metadata Reflection API my Microsoft","archived":false,"fork":false,"pushed_at":"2022-06-24T11:20:10.000Z","size":32,"stargazers_count":11,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T09:11:38.962Z","etag":null,"topics":["deno","reflect-metadata","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmd-johnson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-14T07:33:29.000Z","updated_at":"2024-02-18T22:58:25.000Z","dependencies_parsed_at":"2022-09-26T18:11:16.652Z","dependency_job_id":null,"html_url":"https://github.com/cmd-johnson/deno-reflect-metadata","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-johnson%2Fdeno-reflect-metadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-johnson%2Fdeno-reflect-metadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-johnson%2Fdeno-reflect-metadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmd-johnson%2Fdeno-reflect-metadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmd-johnson","download_url":"https://codeload.github.com/cmd-johnson/deno-reflect-metadata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199088,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","reflect-metadata","typescript"],"created_at":"2024-10-12T22:52:40.689Z","updated_at":"2025-04-10T10:24:16.758Z","avatar_url":"https://github.com/cmd-johnson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metadata Reflection API for Deno\n\nThis is a direct copy of the [Metadata Reflection API by Microsoft](https://github.com/rbuckton/reflect-metadata) with [slight changes](https://github.com/cmd-johnson/deno-reflect-metadata/commit/a39666813eb7e8b38fe563f275085b60f044af7e) to make it usable in Deno.\n\nCheck out the [Source Repository](https://github.com/rbuckton/reflect-metadata) for more details.\n\n## Example usage\n\n```ts\nimport { Reflect } from \"https://deno.land/x/reflect_metadata@v0.1.12-2/mod.ts\";\n\n// deno-lint-ignore no-explicit-any\ntype Constructor\u003cT = unknown\u003e = new (...args: any[]) =\u003e T;\n\nfunction decorator\u003cT\u003e(_: Constructor\u003cT\u003e): void {}\n\n@decorator\nclass Example {\n  constructor(a: string, b: number, c: Example) {}\n}\n\nconsole.log(Reflect.getMetadata(\"design:paramtypes\", Example));\n// \"[ [Function: String], [Function: Number], [Function: Example] ]\"\n```\n\nThe decorator is required for the TypeScript compiler to generate metadata for the Example class.\nIf you don't put a decorator on the Example class, the call to `getMetadata` will return `undefined`.\n\n\u003e Remember to always add a `tsconfig.json` file with the following content and running your code using `deno run -c tsconfig.json your_code.ts` or decorators and reflection will not work!\n\n```json\n{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmd-johnson%2Fdeno-reflect-metadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmd-johnson%2Fdeno-reflect-metadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmd-johnson%2Fdeno-reflect-metadata/lists"}