{"id":17062341,"url":"https://github.com/devpaul/tsdecorators-example","last_synced_at":"2025-04-12T18:13:17.834Z","repository":{"id":34283706,"uuid":"38172390","full_name":"devpaul/TSDecorators-example","owner":"devpaul","description":"An example of Typescript Decorators usage","archived":false,"fork":false,"pushed_at":"2015-08-10T05:00:22.000Z","size":164,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:13:09.038Z","etag":null,"topics":["decorators","example","typescript","typescript-decorators"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devpaul.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":"2015-06-27T19:25:58.000Z","updated_at":"2019-06-03T22:27:12.000Z","dependencies_parsed_at":"2022-09-04T05:52:39.231Z","dependency_job_id":null,"html_url":"https://github.com/devpaul/TSDecorators-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2FTSDecorators-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2FTSDecorators-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2FTSDecorators-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2FTSDecorators-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devpaul","download_url":"https://codeload.github.com/devpaul/TSDecorators-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610341,"owners_count":21132919,"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":["decorators","example","typescript","typescript-decorators"],"created_at":"2024-10-14T10:49:45.388Z","updated_at":"2025-04-12T18:13:17.809Z","avatar_url":"https://github.com/devpaul.png","language":"TypeScript","readme":"# Examples of TypeScript Decorator Usage\n\nThis repo provides example usage of TypeScript Decorators and Metadata. \nHopefully this will provide a base for people to experiment and learn!\n\nThese examples were produced based on information presented by Wolk Software Limited's three part series on\n[Decorators \u0026 metadata reflection in Typescript: From Novice to Expert](http://blog.wolksoftware.com/decorators-reflection-javascript-typescript),\nthe metadata [PR #2589](https://github.com/Microsoft/TypeScript/pull/2589) and rbuckton's [ES7 Reflection Prototype](https://github.com/rbuckton/ReflectDecorators).\nThanks!\n\n## Quickstart\n\n* `npm install`\n* `grunt test-proxy`\n* open [http://localhost:9000/node_modules/intern/client.html?config=_build/tests/intern-local](http://localhost:9000/node_modules/intern/client.html?config=_build/tests/intern-local)\n\n## A Quick Tour\n\n### /src/examples\n\nThis directory has example usage and comments about decorators and metadata. Examples show how to use the four different\ndecorators (class, method, parameter, and property), decorator factories used when parameters are passed in a\ndecorator, and custom metadata usage.\n\n### /src/patterns\n\nIncludes examples of using decorators to facilitate mixins and dependency injection\n\n### /tests/unit\n\nThis directory has some unit tests illustrating how the different descriptors behave\n\n## Notes\nAs of version 4.2.0.beta1 `grunt-ts` doesn't yet have support for the experimentalDecorators flag\n[issue #259](https://github.com/TypeStrong/grunt-ts/issues/259). We work around this by declaring\n`--experimentalDecorators` in `additionalFlags`.\n \nMetadata support is polyfilled using [reflect-metadata](https://www.npmjs.com/package/reflect-metadata)\nMore information about how TypeScript leverages it is here:\n\n* [TypeScript PR#2589](https://github.com/Microsoft/TypeScript/pull/2589)\n* [Typescript issue #2577](https://github.com/Microsoft/TypeScript/issues/2577)\n \n## Grunt Commands\n\n* `grunt lint` - validates style rules\n* `grunt test` - runs intern's node client\n* `grunt test-local` - runs intern's runner with local configuration (Selenium required)\n* `grunt test-proxy` - starts intern's testing proxy\n* `grunt test-runner` - runs intern's runner (BrowserStack/SauceLabs required)\n* `grunt ci` - runs tests in a continuous integration environment\n* `grunt clean` - cleans development work\n* `grunt` - compiles files\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpaul%2Ftsdecorators-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevpaul%2Ftsdecorators-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpaul%2Ftsdecorators-example/lists"}