From 6afbfafb57fc9409ccb4e98db520653c94e07d8d Mon Sep 17 00:00:00 2001 From: alin Date: Fri, 2 Feb 2024 15:12:37 +0100 Subject: [PATCH] Highlight target meta decorator feature --- docs/archive/current/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/archive/current/README.md b/docs/archive/current/README.md index a6493385..9b9cf89e 100644 --- a/docs/archive/current/README.md +++ b/docs/archive/current/README.md @@ -29,6 +29,28 @@ _TBD: "To be decided"._ ## `v0.x` Highlights +### "Target" Meta Decorator + +Associate arbitrary metadata directly with the target element that is being decorated. +_See [target meta decorator](./packages/support/meta.md) fro additional details._ + +```js +import {targetMeta, getTargetMeta} from '@aedart/support/meta'; + +class Service { + + @targetMeta('desc', 'Seaches for cities') + search() { + // ...not shown... + } +} + +const instance = new Service(); + +// ...later in your application... +getTargetMeta(instance.search, 'desc'); // Seaches for cities +``` + ### Meta Decorator The [meta decorator](./packages/support/meta.md) is able to associate arbitrary metadata with a class and its elements.