{"version":"1.0","type":"rich","title":"TypeScript Decorators Examples","description":"This example demonstrates five TypeScript decorator patterns—class, method, property, parameter, and decorator factory—applied to a Person class with logging behavior. The code uses the `Reflect.getMetadata` API in the reflect_metadata file to inspect parameter types at runtime. Class decorators wrap constructors with logging, while method and property decorators intercept calls and value changes via `Object.defineProperty`. Parameter decorators record indices for targeted logging, and the factory dispatches based on argument count. The source is a TypeScript gist showing decorators as functions that receive target, key, and descriptor arguments.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-ce7a6b43b4026fac41b11be61ad1d46c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}