[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"verticals":3,"article-typescript-standard-decorators":44,"search-suggestions":266,"path-membership-typescript-standard-decorators":306,"related-typescript-standard-decorators":307,"code:plain:true:vbrvs5":438,"code:ts:true:1hh7b9":439,"comments-01a1fce0-e587-7436-8e62-e44a66e867f3":440},[4,20,32],{"id":5,"slug":6,"name":7,"tagline":8,"description":9,"accentFrom":10,"accentTo":11,"icon":12,"defaultLocale":13,"locales":14,"features":16,"position":19},"019fe637-3d33-714b-b57f-23e163ffca0c","dev","Web Development","Read it. Run it. Prove it.","A post a day on modern web development — most with an editable playground and a quiz that explains every answer. Free, no account needed.","violet-500","cyan-400","◇","en",[13,15],"fa",{"courses":17,"paths":17,"articles":17,"exams":18,"flashcards":18,"packages":17,"community":17,"certificates":17,"teams":17,"commerce":17},true,false,0,{"id":21,"slug":22,"name":23,"tagline":24,"description":25,"accentFrom":26,"accentTo":10,"icon":27,"defaultLocale":13,"locales":28,"features":30,"position":31},"019fe637-3dc2-754c-8657-0f175bfee7c6","lang","Languages","Learn a language the way you learn a codebase.","Grammar explained the way good documentation explains an API — one idea at a time, each with a quiz.","amber-400","⌘",[13,15,29],"es",{"courses":18,"paths":18,"articles":17,"exams":18,"flashcards":17,"packages":18,"community":17,"certificates":17,"teams":18,"commerce":18},2,{"id":33,"slug":34,"name":35,"tagline":36,"description":37,"accentFrom":38,"accentTo":39,"icon":40,"defaultLocale":13,"locales":41,"features":42,"position":43},"7b3c16f2-931d-410e-802e-e1fa4edab7de","soft","Soft Skills","The half of the job nobody wrote documentation for.","Weekly, on the parts of working life that decide more than your code does — first weeks, meetings, interviews, promotions, and the people around you. Written from what actually happens, and recorded as a podcast you can listen to on the walk.","emerald-400","teal-300","◉",[13],{"courses":18,"paths":18,"articles":17,"exams":18,"flashcards":18,"packages":18,"community":17,"certificates":18,"teams":18,"commerce":18},3,{"id":45,"slug":46,"title":47,"subtitle":48,"excerpt":49,"coverUrl":50,"locale":13,"readingMinutes":51,"publishedAt":52,"viewCount":53,"likeCount":19,"commentCount":19,"author":54,"vertical":59,"topic":60,"tags":63,"_count":75,"playground":77,"body":79,"bodyMd":249,"seo":250,"translationGroupId":253,"series":48,"podcastUrl":48,"verticalId":5,"thread":254,"assessments":256,"translations":262,"quiz":264},"01a1fce0-e587-7436-8e62-e44a66e867f3","typescript-standard-decorators","Your Framework's Decorators Still Need `experimentalDecorators`",null,"TypeScript 5 shipped real, standardized decorators with no flag required — but if your framework injects constructor parameters, deleting experimentalDecorators breaks it, and that's permanent, not a migration lag.","\u002Fmedia\u002Fcovers\u002Ftypescript-standard-decorators.png",6,"2026-11-27T11:31:09.564Z",26,{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},"019fe637-3c25-7088-9034-39c9f15dc3c8","Parsa Jiravand","parsa","Frontend engineer · building bestpractic",{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":61,"name":62},"typescript","TypeScript",[64,66,69,72],{"slug":61,"name":65,"color":48},"Typescript",{"slug":67,"name":68,"color":48},"javascript","Javascript",{"slug":70,"name":71,"color":48},"webdev","Webdev",{"slug":73,"name":74,"color":48},"tutorial","Tutorial",{"assessments":76},1,{"slug":46,"title":78},"Legacy vs standard TypeScript decorators — interactive playground",{"blocks":80,"version":76},[81,85,88,94,97,101,104,107,111,114,117,122,125,128,131,134,137,140,143,146,170,173,176,179,182,185,188,191,194,197,200,203,206,209,212,215,218,221,224,231,234,237,240,243],{"id":82,"html":83,"type":84},"b1","\u003Cp>You&#39;re tidying up \u003Ccode>tsconfig.json\u003C\u002Fcode>. \u003Ccode>experimentalDecorators: true\u003C\u002Fcode> has been sitting there since someone copy-pasted it from a tutorial two years ago, and it looks like exactly the kind of thing worth deleting — TypeScript 5 has had real, standardized decorators for a while now, no flag required. You remove the line, save, and run the build.\u003C\u002Fp>","paragraph",{"id":86,"html":87,"type":84},"b2","\u003Cp>It goes red in nineteen places. Every one of them is a NestJS service, and every error traces back to a constructor argument.\u003C\u002Fp>",{"id":89,"code":90,"type":91,"language":92,"highlight":93},"b3","src\u002Fusers\u002Fusers.service.ts:12:30 - error TS1206: Decorators are not valid here.\n  constructor(@InjectRepository(User) private repo: Repository\u003CUser>) {}\n                              ~~~~~~~~","code","plain",[],{"id":95,"html":96,"type":84},"b4","\u003Cp>Nothing about that message mentions &quot;legacy&quot; or &quot;standard&quot; decorators. It just says the decorator isn&#39;t valid in that position anymore — which is technically true, and tells you nothing about why a flag you just deleted was the thing holding your dependency injection together.\u003C\u002Fp>",{"id":98,"html":99,"text":99,"type":100,"level":31},"b5","The belief: experimentalDecorators is legacy cruft now","heading",{"id":102,"html":103,"type":84},"b6","\u003Cp>Here&#39;s the reasoning, and it&#39;s not unreasonable: decorators spent years in TC39 limbo, TypeScript shipped them early and gated them behind \u003Ccode>experimentalDecorators\u003C\u002Fcode> as a warning label, and in March 2023 TypeScript 5.0 added support for the real, Stage 3 ECMAScript decorators proposal — on by default, no flag at all. &quot;Experimental&quot; sounds temporary. &quot;Standardized&quot; sounds like the upgrade path. Delete the old flag, get the new thing. That&#39;s how every other \u003Ccode>experimentalX\u003C\u002Fcode> flag in \u003Ccode>tsconfig.json\u003C\u002Fcode> has worked.\u003C\u002Fp>",{"id":105,"html":106,"type":84},"b7","\u003Cp>Except decorators aren&#39;t one feature with two flag states. They&#39;re two different features that happen to share a syntax (\u003Ccode>@something\u003C\u002Fcode>), and only one of the two was ever submitted to TC39.\u003C\u002Fp>",{"id":108,"html":109,"text":110,"type":100,"level":31},"b8","The crack: parameter decorators don&#39;t exist in the new spec","The crack: parameter decorators don't exist in the new spec",{"id":112,"html":113,"type":84},"b9","\u003Cp>Open the actual TC39 decorators proposal and look at what it lets you attach a decorator to: classes, methods, getters, setters, and fields (including the new \u003Ccode>accessor\u003C\u002Fcode> keyword for auto-accessors). That&#39;s the complete list. Constructor and method \u003Cstrong>parameters\u003C\u002Fstrong> aren&#39;t in it — not deprioritized, not planned for a later stage, just never part of the proposal TC39 advanced.\u003C\u002Fp>",{"id":115,"html":116,"type":84},"b10","\u003Cp>That&#39;s a problem for a specific, common pattern: frameworks that figure out what to inject by decorating constructor parameters.\u003C\u002Fp>",{"id":118,"code":119,"type":91,"language":120,"highlight":121},"b11","\u002F\u002F NestJS, Angular, InversifyJS — this exact shape\nconstructor(\n  @Inject(CONFIG_TOKEN) private config: Config,\n  private usersService: UsersService,\n) {}","ts",[],{"id":123,"html":124,"type":84},"b12","\u003Cp>\u003Ccode>@Inject(CONFIG_TOKEN)\u003C\u002Fcode> is a parameter decorator. There is no standard-decorators equivalent — not a different syntax, not a config flag, nothing. The new spec&#39;s decorator function signature is \u003Ccode>(value, context)\u003C\u002Fcode>, built for wrapping a class, a method, or a field. A constructor parameter was never something the proposal gave you a way to describe.\u003C\u002Fp>",{"id":126,"html":127,"type":84},"b13","\u003Cp>So when you turn \u003Ccode>experimentalDecorators\u003C\u002Fcode> off, TypeScript isn&#39;t &quot;modernizing&quot; that decorator. It&#39;s telling you the position you put it in no longer accepts one, because under the new rules, it never did.\u003C\u002Fp>",{"id":129,"html":130,"text":130,"type":100,"level":31},"b14","Why the belief persists",{"id":132,"html":133,"type":84},"b15","\u003Cp>Two things point the same direction and both happen to be wrong.\u003C\u002Fp>",{"id":135,"html":136,"type":84},"b16","\u003Cp>First, \u003Ccode>experimentalDecorators\u003C\u002Fcode> sounds provisional by name — and for years it was, in the sense that \u003Cem>some\u003C\u002Fem> decorators feature was always going to graduate out of it eventually. One did. TypeScript&#39;s release notes announced &quot;decorators&quot; shipping in 5.0 without the headline distinguishing which half of the old functionality survived the trip through TC39.\u003C\u002Fp>",{"id":138,"html":139,"type":84},"b17","\u003Cp>Second, most teams meet decorators through a framework, not through the language spec. If you&#39;ve only ever written \u003Ccode>@Injectable()\u003C\u002Fcode> and \u003Ccode>@Inject()\u003C\u002Fcode>, every decorator you&#39;ve used looks like one feature. There&#39;s no moment where the framework tells you &quot;by the way, three of these four decorator kinds have a TC39-standard twin and one doesn&#39;t&quot; — you find out when you delete a flag and the build breaks on exactly the one kind that doesn&#39;t.\u003C\u002Fp>",{"id":141,"html":142,"text":142,"type":100,"level":31},"b18","The better mental model: two systems, not one flag",{"id":144,"html":145,"type":84},"b19","\u003Cp>Stop thinking of \u003Ccode>experimentalDecorators: true\u003C\u002Fcode> → \u003Ccode>false\u003C\u002Fcode> as a version bump. Treat them as two separate decorator implementations that happen to share an \u003Ccode>@\u003C\u002Fcode> symbol:\u003C\u002Fp>",{"id":147,"head":148,"rows":152,"type":169},"b20",[149,150,151],"","Legacy (\u003Ccode>experimentalDecorators: true\u003C\u002Fcode>)","Standard (TC39, default since TS 5.0)",[153,157,161,165],[154,155,156],"Decorator signature","\u003Ccode>(target, propertyKey, descriptor)\u003C\u002Fcode>","\u003Ccode>(value, context)\u003C\u002Fcode>",[158,159,160],"Can decorate","class, method, accessor, property, \u003Cstrong>parameter\u003C\u002Fstrong>","class, method, getter\u002Fsetter, field\u002F\u003Ccode>accessor\u003C\u002Fcode> — \u003Cstrong>no parameters\u003C\u002Fstrong>",[162,163,164],"Metadata","\u003Ccode>emitDecoratorMetadata\u003C\u002Fcode> + \u003Ccode>reflect-metadata\u003C\u002Fcode>, read via \u003Ccode>Reflect.getMetadata\u003C\u002Fcode>","a separate, still-settling \u003Ccode>Symbol.metadata\u003C\u002Fcode> proposal — not the same mechanism",[166,167,168],"Needs a flag?","Yes, \u003Ccode>experimentalDecorators: true\u003C\u002Fcode>","No — it&#39;s what you get by default","table",{"id":171,"html":172,"type":84},"b21","\u003Cp>Frameworks whose dependency injection runs through constructor parameters — NestJS and Angular are the two you&#39;ve most likely used — are built on the legacy system specifically because it&#39;s the only one with parameter decorators. That&#39;s not these frameworks lagging behind; migrating their DI off constructor parameters would mean redesigning how every existing app wires its services. \u003Ccode>experimentalDecorators: true\u003C\u002Fcode> in their generated \u003Ccode>tsconfig.json\u003C\u002Fcode> isn&#39;t a leftover setting. It&#39;s a requirement with no newer substitute, because the newer spec was never designed to cover this case.\u003C\u002Fp>",{"id":174,"html":175,"type":84},"b22","\u003Cp>Try the flip side in the playground below: pick &quot;method decorator&quot; instead of &quot;constructor injection,&quot; and the exact same toggle that broke the build a second ago compiles clean either way — because a method decorator is one of the cases both systems actually support.\u003C\u002Fp>",{"id":177,"html":178,"type":84},"b23","\u003C!-- playground:start -->",{"id":180,"html":181,"text":181,"type":100,"level":31},"b24","🎮 Try it yourself",{"id":183,"html":184,"type":84},"b25","\u003Cp>\u003Cstrong>\u003Ca href=\"https:\u002F\u002Fbestpractic.org\u002Fblog\u002Ftypescript-standard-decorators\u002Fplayground\">▶️ Open the interactive playground →\u003C\u002Fa>\u003C\u002Fstrong>\u003C\u002Fp>",{"id":186,"html":187,"type":84},"b26","\u003Cp>\u003Cem>Runs right in your browser — poke at it and watch the concept react live.\u003C\u002Fem>\u003C\u002Fp>",{"id":189,"html":190,"type":84},"b27","\u003C!-- playground:end -->",{"id":192,"html":193,"text":193,"type":100,"level":31},"b28","When turning it off is genuinely fine",{"id":195,"html":196,"type":84},"b29","\u003Cp>This isn&#39;t an argument for leaving \u003Ccode>experimentalDecorators: true\u003C\u002Fcode> everywhere out of caution. If your decorators are method- or class-level — a \u003Ccode>@Memoize()\u003C\u002Fcode> cache wrapper, a \u003Ccode>@LogExecutionTime()\u003C\u002Fcode> on a method, MobX&#39;s \u003Ccode>@observable\u003C\u002Fcode> on a field — none of that touches a constructor parameter, and the standard decorators handle it natively. Converting that code is a real decorators 5.0 migration, not an identity crisis, and it drops you to zero legacy flags with nothing structurally in the way.\u003C\u002Fp>",{"id":198,"html":199,"type":84},"b30","\u003Cp>The test is narrow and mechanical: grep your codebase for a decorator sitting inside a constructor&#39;s parameter list. If there&#39;s nothing there, flip the flag and watch the build stay green. If there is, that flag isn&#39;t debt — it&#39;s load-bearing, and it stays until something gives constructor parameters a standard decorator of their own. There&#39;s a TC39 proposal for exactly that, \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftc39\u002Fproposal-class-method-parameter-decorators\">Class Method Parameter Decorators\u003C\u002Fa> — but it&#39;s been stuck at Stage 1 since it was last presented in March 2023, so there&#39;s no migration path you can actually plan around today.\u003C\u002Fp>",{"id":201,"html":202,"type":84},"b31","\u003C!-- quiz:start -->",{"id":204,"html":205,"text":205,"type":100,"level":31},"b32","🧠 Test yourself",{"id":207,"html":208,"type":84},"b33","\u003Cp>Think it clicked? \u003Cstrong>\u003Ca href=\"https:\u002F\u002Fbestpractic.org\u002Fblog\u002Ftypescript-standard-decorators\u002Fquiz\">Take the 8-question quiz →\u003C\u002Fa>\u003C\u002Fstrong>\u003C\u002Fp>",{"id":210,"html":211,"type":84},"b34","\u003Cp>\u003Cem>Instant feedback, a hint on every question, and an explanation for each answer — right or wrong.\u003C\u002Fem>\u003C\u002Fp>",{"id":213,"html":214,"type":84},"b35","\u003C!-- quiz:end -->",{"id":216,"html":217,"type":84},"b36","\u003Cp>Go check your own \u003Ccode>tsconfig.json\u003C\u002Fcode>. Is \u003Ccode>experimentalDecorators\u003C\u002Fcode> sitting in there because nobody&#39;s gotten around to removing it — or because something in your constructors genuinely needs it? I&#39;d bet a fair number of you find out it&#39;s the second one.\u003C\u002Fp>",{"id":219,"html":220,"type":84},"b37","\u003C!-- related:start -->",{"id":222,"html":223,"text":223,"type":100,"level":31},"b38","📚 Read next",{"id":225,"type":226,"items":227,"ordered":18},"b39","list",[228,229,230],"\u003Ca href=\"https:\u002F\u002Fbestpractic.org\u002Fblog\u002Fnestjs-weekly-standard-schema-validation\">NestJS 12: Standard Schema Validation Without class-validator\u003C\u002Fa>","\u003Ca href=\"https:\u002F\u002Fbestpractic.org\u002Fblog\u002Fweekly-typescript-generics\">TypeScript Generics: The Complete Guide (with Cheat Sheet)\u003C\u002Fa>","\u003Ca href=\"https:\u002F\u002Fbestpractic.org\u002Fblog\u002Ftypescript-as-const-assertions\">My Reducer&#39;s Switch Stopped Being Exhaustive. \u003Ccode>as const\u003C\u002Fcode> Fixed It.\u003C\u002Fa>",{"id":232,"html":233,"type":84},"b40","\u003C!-- related:end -->",{"id":235,"type":236},"b41","divider",{"id":238,"html":239,"type":84},"b42","\u003Cp>🚀 \u003Cstrong>Want more like this?\u003C\u002Fstrong> Every guide, playground, and quiz lives on \u003Cstrong>\u003Ca href=\"https:\u002F\u002Fbestpractic.org\u002F\">bestpractic.org\u003C\u002Fa>\u003C\u002Fstrong> — open it and \u003Cstrong>\u003Ca href=\"https:\u002F\u002Fbestpractic.org\u002F\">sign up free\u003C\u002Fa>\u003C\u002Fstrong> so the next one finds you.\u003C\u002Fp>",{"id":241,"html":242,"type":84},"b43","\u003Cp>\u003Cem>Thanks for reading! Let&#39;s stay connected:\u003C\u002Fem>\u003C\u002Fp>",{"id":244,"type":226,"items":245,"ordered":18},"b44",[246,247,248],"⭐ \u003Cstrong>GitHub\u003C\u002Fstrong> — follow me and star the projects: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fparsajiravand\">github.com\u002Fparsajiravand\u003C\u002Fa>","💬 \u003Cstrong>Discord\u003C\u002Fstrong> — join the frontend best-practices community: \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Fd9KRhuAwQ\">discord.gg\u002Fd9KRhuAwQ\u003C\u002Fa>","📸 \u003Cstrong>Instagram\u003C\u002Fstrong> — frontend best practices, daily: \u003Ca href=\"https:\u002F\u002Fwww.instagram.com\u002Fbestpractice___\u002F\">@bestpractice___\u003C\u002Fa>","You're tidying up `tsconfig.json`. `experimentalDecorators: true` has been sitting there since someone copy-pasted it from a tutorial two years ago, and it looks like exactly the kind of thing worth deleting — TypeScript 5 has had real, standardized decorators for a while now, no flag required. You remove the line, save, and run the build.\n\nIt goes red in nineteen places. Every one of them is a NestJS service, and every error traces back to a constructor argument.\n\n```\nsrc\u002Fusers\u002Fusers.service.ts:12:30 - error TS1206: Decorators are not valid here.\n  constructor(@InjectRepository(User) private repo: Repository\u003CUser>) {}\n                              ~~~~~~~~\n```\n\nNothing about that message mentions \"legacy\" or \"standard\" decorators. It just says the decorator isn't valid in that position anymore — which is technically true, and tells you nothing about why a flag you just deleted was the thing holding your dependency injection together.\n\n## The belief: experimentalDecorators is legacy cruft now\n\nHere's the reasoning, and it's not unreasonable: decorators spent years in TC39 limbo, TypeScript shipped them early and gated them behind `experimentalDecorators` as a warning label, and in March 2023 TypeScript 5.0 added support for the real, Stage 3 ECMAScript decorators proposal — on by default, no flag at all. \"Experimental\" sounds temporary. \"Standardized\" sounds like the upgrade path. Delete the old flag, get the new thing. That's how every other `experimentalX` flag in `tsconfig.json` has worked.\n\nExcept decorators aren't one feature with two flag states. They're two different features that happen to share a syntax (`@something`), and only one of the two was ever submitted to TC39.\n\n## The crack: parameter decorators don't exist in the new spec\n\nOpen the actual TC39 decorators proposal and look at what it lets you attach a decorator to: classes, methods, getters, setters, and fields (including the new `accessor` keyword for auto-accessors). That's the complete list. Constructor and method **parameters** aren't in it — not deprioritized, not planned for a later stage, just never part of the proposal TC39 advanced.\n\nThat's a problem for a specific, common pattern: frameworks that figure out what to inject by decorating constructor parameters.\n\n```ts\n\u002F\u002F NestJS, Angular, InversifyJS — this exact shape\nconstructor(\n  @Inject(CONFIG_TOKEN) private config: Config,\n  private usersService: UsersService,\n) {}\n```\n\n`@Inject(CONFIG_TOKEN)` is a parameter decorator. There is no standard-decorators equivalent — not a different syntax, not a config flag, nothing. The new spec's decorator function signature is `(value, context)`, built for wrapping a class, a method, or a field. A constructor parameter was never something the proposal gave you a way to describe.\n\nSo when you turn `experimentalDecorators` off, TypeScript isn't \"modernizing\" that decorator. It's telling you the position you put it in no longer accepts one, because under the new rules, it never did.\n\n## Why the belief persists\n\nTwo things point the same direction and both happen to be wrong.\n\nFirst, `experimentalDecorators` sounds provisional by name — and for years it was, in the sense that *some* decorators feature was always going to graduate out of it eventually. One did. TypeScript's release notes announced \"decorators\" shipping in 5.0 without the headline distinguishing which half of the old functionality survived the trip through TC39.\n\nSecond, most teams meet decorators through a framework, not through the language spec. If you've only ever written `@Injectable()` and `@Inject()`, every decorator you've used looks like one feature. There's no moment where the framework tells you \"by the way, three of these four decorator kinds have a TC39-standard twin and one doesn't\" — you find out when you delete a flag and the build breaks on exactly the one kind that doesn't.\n\n## The better mental model: two systems, not one flag\n\nStop thinking of `experimentalDecorators: true` → `false` as a version bump. Treat them as two separate decorator implementations that happen to share an `@` symbol:\n\n| | Legacy (`experimentalDecorators: true`) | Standard (TC39, default since TS 5.0) |\n|---|---|---|\n| Decorator signature | `(target, propertyKey, descriptor)` | `(value, context)` |\n| Can decorate | class, method, accessor, property, **parameter** | class, method, getter\u002Fsetter, field\u002F`accessor` — **no parameters** |\n| Metadata | `emitDecoratorMetadata` + `reflect-metadata`, read via `Reflect.getMetadata` | a separate, still-settling `Symbol.metadata` proposal — not the same mechanism |\n| Needs a flag? | Yes, `experimentalDecorators: true` | No — it's what you get by default |\n\nFrameworks whose dependency injection runs through constructor parameters — NestJS and Angular are the two you've most likely used — are built on the legacy system specifically because it's the only one with parameter decorators. That's not these frameworks lagging behind; migrating their DI off constructor parameters would mean redesigning how every existing app wires its services. `experimentalDecorators: true` in their generated `tsconfig.json` isn't a leftover setting. It's a requirement with no newer substitute, because the newer spec was never designed to cover this case.\n\nTry the flip side in the playground below: pick \"method decorator\" instead of \"constructor injection,\" and the exact same toggle that broke the build a second ago compiles clean either way — because a method decorator is one of the cases both systems actually support.\n\n\u003C!-- playground:start -->\n\n## 🎮 Try it yourself\n\n**[▶️ Open the interactive playground →](https:\u002F\u002Fbestpractic.org\u002Fblog\u002Ftypescript-standard-decorators\u002Fplayground)**\n\n_Runs right in your browser — poke at it and watch the concept react live._\n\n\u003C!-- playground:end -->\n\n## When turning it off is genuinely fine\n\nThis isn't an argument for leaving `experimentalDecorators: true` everywhere out of caution. If your decorators are method- or class-level — a `@Memoize()` cache wrapper, a `@LogExecutionTime()` on a method, MobX's `@observable` on a field — none of that touches a constructor parameter, and the standard decorators handle it natively. Converting that code is a real decorators 5.0 migration, not an identity crisis, and it drops you to zero legacy flags with nothing structurally in the way.\n\nThe test is narrow and mechanical: grep your codebase for a decorator sitting inside a constructor's parameter list. If there's nothing there, flip the flag and watch the build stay green. If there is, that flag isn't debt — it's load-bearing, and it stays until something gives constructor parameters a standard decorator of their own. There's a TC39 proposal for exactly that, [Class Method Parameter Decorators](https:\u002F\u002Fgithub.com\u002Ftc39\u002Fproposal-class-method-parameter-decorators) — but it's been stuck at Stage 1 since it was last presented in March 2023, so there's no migration path you can actually plan around today.\n\n\u003C!-- quiz:start -->\n\n## 🧠 Test yourself\n\nThink it clicked? **[Take the 8-question quiz →](https:\u002F\u002Fbestpractic.org\u002Fblog\u002Ftypescript-standard-decorators\u002Fquiz)**\n\n_Instant feedback, a hint on every question, and an explanation for each answer — right or wrong._\n\n\u003C!-- quiz:end -->\n\nGo check your own `tsconfig.json`. Is `experimentalDecorators` sitting in there because nobody's gotten around to removing it — or because something in your constructors genuinely needs it? I'd bet a fair number of you find out it's the second one.\n\n\u003C!-- related:start -->\n\n## 📚 Read next\n\n- [NestJS 12: Standard Schema Validation Without class-validator](https:\u002F\u002Fbestpractic.org\u002Fblog\u002Fnestjs-weekly-standard-schema-validation)\n- [TypeScript Generics: The Complete Guide (with Cheat Sheet)](https:\u002F\u002Fbestpractic.org\u002Fblog\u002Fweekly-typescript-generics)\n- [My Reducer's Switch Stopped Being Exhaustive. `as const` Fixed It.](https:\u002F\u002Fbestpractic.org\u002Fblog\u002Ftypescript-as-const-assertions)\n\n\u003C!-- related:end -->\n\n---\n\n🚀 **Want more like this?** Every guide, playground, and quiz lives on **[bestpractic.org](https:\u002F\u002Fbestpractic.org\u002F)** — open it and **[sign up free](https:\u002F\u002Fbestpractic.org\u002F)** so the next one finds you.\n\n*Thanks for reading! Let's stay connected:*\n\n- ⭐ **GitHub** — follow me and star the projects: [github.com\u002Fparsajiravand](https:\u002F\u002Fgithub.com\u002Fparsajiravand)\n- 💬 **Discord** — join the frontend best-practices community: [discord.gg\u002Fd9KRhuAwQ](https:\u002F\u002Fdiscord.gg\u002Fd9KRhuAwQ)\n- 📸 **Instagram** — frontend best practices, daily: [@bestpractice___](https:\u002F\u002Fwww.instagram.com\u002Fbestpractice___\u002F)",{"title":47,"canonical":251,"description":252},"https:\u002F\u002Fbestpractic.org\u002Fblog\u002Ftypescript-standard-decorators","TypeScript 5 shipped real, standardized decorators with no flag required — but if your framework injects constructor parameters, deleting experimentalDecorators breaks it, and that","01a1fce0-e587-7436-8e62-e8871028aa22",{"id":255,"locked":18},"01a1fce0-e626-75c7-8f2a-f630b1d8dac3",[257],{"id":258,"slug":46,"title":259,"_count":260},"01a1fce0-e64e-74ab-864a-9c98c09f49fa","Legacy vs. Standard TypeScript Decorators Quiz",{"questions":261},8,[263],{"locale":13,"slug":46},{"id":258,"slug":46,"title":259,"_count":265,"questionCount":261},{"questions":261},[267,269,271,275,277,281,283,287,290,294,298,302],{"slug":70,"name":71,"articles":268},195,{"slug":67,"name":68,"articles":270},156,{"slug":272,"name":273,"articles":274},"frontend","Frontend",103,{"slug":73,"name":74,"articles":276},85,{"slug":278,"name":279,"articles":280},"css","Css",56,{"slug":61,"name":65,"articles":282},36,{"slug":284,"name":285,"articles":286},"performance","Performance",33,{"slug":288,"name":289,"articles":53},"programming","Programming",{"slug":291,"name":292,"articles":293},"react","React",23,{"slug":295,"name":296,"articles":297},"node","Node",19,{"slug":299,"name":300,"articles":301},"browser","Browser",18,{"slug":303,"name":304,"articles":305},"nextjs","Nextjs",13,[],{"items":308,"meta":436},[309,327,346,365,382,402,419],{"id":310,"slug":311,"title":312,"subtitle":48,"excerpt":313,"coverUrl":314,"locale":13,"readingMinutes":51,"publishedAt":315,"viewCount":316,"likeCount":19,"commentCount":19,"author":317,"vertical":318,"topic":319,"tags":320,"_count":325,"playground":326,"hasQuiz":17,"hasPlayground":17},"01a1fce0-dac8-71e2-bd25-94b1cc5aa337","typescript-template-literal-types","Template Literal Types Explained: Catching Path Typos at Compile Time","A typo'd dot-path like \"theme.colros.primary\" compiles clean and fails silently at runtime — template literal types make TypeScript catch it before you ship.","\u002Fmedia\u002Fcovers\u002Ftypescript-template-literal-types.png","2026-11-27T11:49:01.332Z",11,{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":61,"name":62},[321,322,323,324],{"slug":61,"name":65,"color":48},{"slug":67,"name":68,"color":48},{"slug":70,"name":71,"color":48},{"slug":73,"name":74,"color":48},{"assessments":76},{"slug":311},{"id":328,"slug":329,"title":330,"subtitle":48,"excerpt":331,"coverUrl":332,"locale":13,"readingMinutes":333,"publishedAt":334,"viewCount":335,"likeCount":19,"commentCount":19,"author":336,"vertical":337,"topic":338,"tags":339,"_count":344,"playground":345,"hasQuiz":17,"hasPlayground":17},"01a1fce0-c9cc-7004-b075-6c0ff7c7b600","weekly-typescript-type-narrowing","TypeScript Type Narrowing: The Complete Guide","Learn how TypeScript type narrowing really works — typeof, instanceof, discriminated unions, and custom type guards — plus a copy-paste cheat sheet.","\u002Fmedia\u002Fcovers\u002Fweekly-typescript-type-narrowing.png",15,"2026-11-27T11:46:59.418Z",14,{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":61,"name":62},[340,341,342,343],{"slug":61,"name":65,"color":48},{"slug":67,"name":68,"color":48},{"slug":73,"name":74,"color":48},{"slug":70,"name":71,"color":48},{"assessments":76},{"slug":329},{"id":347,"slug":348,"title":349,"subtitle":48,"excerpt":350,"coverUrl":351,"locale":13,"readingMinutes":352,"publishedAt":353,"viewCount":354,"likeCount":19,"commentCount":19,"author":355,"vertical":356,"topic":357,"tags":358,"_count":363,"playground":364,"hasQuiz":17,"hasPlayground":17},"01a1fce0-bedd-7648-b22e-4b7afd1cce13","typescript-branded-types-nominal-typing","TypeScript Can't Tell userId From orderId. Branded Types Can.","TypeScript's structural typing treats userId and orderId as the same type if both are `string` — branded types make them incompatible at compile time.","\u002Fmedia\u002Fcovers\u002Ftypescript-branded-types-nominal-typing.png",5,"2026-11-27T11:45:58.086Z",4,{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":61,"name":62},[359,360,361,362],{"slug":61,"name":65,"color":48},{"slug":67,"name":68,"color":48},{"slug":70,"name":71,"color":48},{"slug":288,"name":289,"color":48},{"assessments":76},{"slug":348},{"id":366,"slug":367,"title":368,"subtitle":48,"excerpt":369,"coverUrl":370,"locale":13,"readingMinutes":352,"publishedAt":371,"viewCount":43,"likeCount":19,"commentCount":19,"author":372,"vertical":373,"topic":374,"tags":375,"_count":380,"playground":381,"hasQuiz":17,"hasPlayground":17},"01a1df1b-32db-7638-a86f-5cea99530919","typescript-noinfer-generic-widening","A Typo Widened My Generic Instead of Erroring. NoInfer\u003CT> Fixes It.","Why a typo'd default argument sailed through a generic function with zero errors — and how TypeScript's NoInfer\u003CT> stops it from silently widening the inferred type.","\u002Fmedia\u002Fcovers\u002Ftypescript-noinfer-generic-widening.png","2026-11-27T11:45:27.674Z",{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":61,"name":62},[376,377,378,379],{"slug":61,"name":65,"color":48},{"slug":67,"name":68,"color":48},{"slug":288,"name":289,"color":48},{"slug":70,"name":71,"color":48},{"assessments":76},{"slug":367},{"id":383,"slug":384,"title":385,"subtitle":48,"excerpt":386,"coverUrl":387,"locale":13,"readingMinutes":388,"publishedAt":389,"viewCount":43,"likeCount":19,"commentCount":19,"author":390,"vertical":391,"topic":392,"tags":395,"_count":400,"playground":401,"hasQuiz":17,"hasPlayground":17},"01a1a1b0-49e9-711f-aea2-cbc2b73acc75","nestjs-weekly-interceptor-order","NestJS Interceptor Order: Why Stacking Breaks Your Cache","NestJS interceptor order decides whether a cache hit skips your response transform. Learn the onion model behind next.handle() — plus a copy-paste cheat sheet.","\u002Fmedia\u002Fcovers\u002Fnestjs-weekly-interceptor-order.png",16,"2026-11-27T11:44:57.150Z",{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":393,"name":394},"nestjs","Nestjs",[396,397,398,399],{"slug":393,"name":394,"color":48},{"slug":295,"name":296,"color":48},{"slug":61,"name":65,"color":48},{"slug":73,"name":74,"color":48},{"assessments":76},{"slug":384},{"id":403,"slug":404,"title":405,"subtitle":48,"excerpt":406,"coverUrl":407,"locale":13,"readingMinutes":352,"publishedAt":408,"viewCount":31,"likeCount":19,"commentCount":19,"author":409,"vertical":410,"topic":411,"tags":412,"_count":417,"playground":418,"hasQuiz":17,"hasPlayground":17},"01a1df1b-2c58-7318-b1ea-6c6fcef9ff05","no-unchecked-indexed-access","arr[i] Isn't Always There. noUncheckedIndexedAccess Says So.","TypeScript types arr[i] as T, never T | undefined — even though the array might be empty. The noUncheckedIndexedAccess flag makes bracket indexing tell the truth.","\u002Fmedia\u002Fcovers\u002Fno-unchecked-indexed-access.png","2026-11-27T11:44:26.334Z",{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":61,"name":62},[413,414,415,416],{"slug":61,"name":65,"color":48},{"slug":67,"name":68,"color":48},{"slug":70,"name":71,"color":48},{"slug":288,"name":289,"color":48},{"assessments":76},{"slug":404},{"id":420,"slug":421,"title":422,"subtitle":48,"excerpt":423,"coverUrl":424,"locale":13,"readingMinutes":352,"publishedAt":425,"viewCount":31,"likeCount":19,"commentCount":19,"author":426,"vertical":427,"topic":428,"tags":429,"_count":434,"playground":435,"hasQuiz":17,"hasPlayground":17},"01a1df1b-2879-726c-b86f-69cba3a4ecc3","typescript-exhaustiveness-checking-never","Your switch forgets a case. Exhaustiveness checking catches it.","How to make the TypeScript compiler fail the build when a switch statement doesn't handle every member of a union — using the `never` type.","\u002Fmedia\u002Fcovers\u002Ftypescript-exhaustiveness-checking-never.png","2026-11-27T11:43:55.790Z",{"id":55,"name":56,"username":57,"avatarUrl":48,"headline":58},{"slug":6,"name":7,"accentFrom":10,"accentTo":11},{"slug":61,"name":62},[430,431,432,433],{"slug":61,"name":65,"color":48},{"slug":67,"name":68,"color":48},{"slug":288,"name":289,"color":48},{"slug":70,"name":71,"color":48},{"assessments":76},{"slug":421},{"page":76,"perPage":437,"total":282,"totalPages":51},7,"\u003Cdiv class=\"shj shj-lang-plain shj-multiline\" data-lang=\"plain\">\u003Cdiv class=\"shj-scroll\">\u003Cdiv class=\"shj-numbers\">\u003Cdiv>1\u003C\u002Fdiv>\u003Cdiv>2\u003C\u002Fdiv>\u003Cdiv>3\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"shj-code\">src\u002Fusers\u002Fusers.service.ts:12:30 - error TS1206: Decorators are not valid here.\n  constructor(@InjectRepository(User) private repo: Repository&lt;User&gt;) {}\n                              ~~~~~~~~\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>","\u003Cdiv class=\"shj shj-lang-ts shj-multiline\" data-lang=\"ts\">\u003Cdiv class=\"shj-scroll\">\u003Cdiv class=\"shj-numbers\">\u003Cdiv>1\u003C\u002Fdiv>\u003Cdiv>2\u003C\u002Fdiv>\u003Cdiv>3\u003C\u002Fdiv>\u003Cdiv>4\u003C\u002Fdiv>\u003Cdiv>5\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cdiv class=\"shj-code\">\u003Cspan class=\"shj-cmnt\">\u002F\u002F NestJS, Angular, InversifyJS — this exact shape\n\u003C\u002Fspan>\u003Cspan class=\"shj-kwd\">constructor\u003C\u002Fspan>\u003Cspan class=\"shj-bracket\">(\u003C\u002Fspan>\n  @\u003Cspan class=\"shj-class\">Inject\u003C\u002Fspan>\u003Cspan class=\"shj-bracket\">(\u003C\u002Fspan>\u003Cspan class=\"shj-num\">CONFIG_TOKEN\u003C\u002Fspan>\u003Cspan class=\"shj-bracket\">)\u003C\u002Fspan> \u003Cspan class=\"shj-kwd\">private\u003C\u002Fspan> config\u003Cspan class=\"shj-oper\">:\u003C\u002Fspan> \u003Cspan class=\"shj-class\">Config\u003C\u002Fspan>\u003Cspan class=\"shj-oper\">,\u003C\u002Fspan>\n  \u003Cspan class=\"shj-kwd\">private\u003C\u002Fspan> usersService\u003Cspan class=\"shj-oper\">:\u003C\u002Fspan> \u003Cspan class=\"shj-class\">UsersService\u003C\u002Fspan>\u003Cspan class=\"shj-oper\">,\u003C\u002Fspan>\n\u003Cspan class=\"shj-bracket\">)\u003C\u002Fspan> \u003Cspan class=\"shj-bracket\">{\u003C\u002Fspan>\u003Cspan class=\"shj-bracket\">}\u003C\u002Fspan>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fdiv>",{"locked":18,"total":19,"comments":441},[]]