Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
typed-reflector
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
typed-reflector
Commits
81f48343
Commit
81f48343
authored
Nov 13, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
2e7718bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
README.md
README.md
+4
-4
src/setter.ts
src/setter.ts
+1
-1
No files found.
README.md
View file @
81f48343
...
...
@@ -18,12 +18,12 @@ Either Reflector or Metadata Setter accepts 2 type arguments. The first one is t
### Metadata Setter
*
`Metadata
.set(metadataKey, value)`
Sets and overrides the metadata
.
*
`Metadata
Setter.set(metadataKey, value)`
Sets and overrides the MetadataSetter
.
*
`Metadata.append(metadataKey, value)`
Append to the the metadata array. The array would be created if not exists.
*
`Metadata
Setter
.append(metadataKey, value)`
Append to the the metadata array. The array would be created if not exists.
*
`Metadata.appendUnique(metadataKey, value)`
Same as above but no duplicate values.
*
`Metadata
Setter
.appendUnique(metadataKey, value)`
Same as above but no duplicate values.
*
`Metadata.concat(metadataKey, value)`
The value must be an array, and the metadata array would be joined together.
*
`Metadata
Setter
.concat(metadataKey, value)`
The value must be an array, and the metadata array would be joined together.
src/setter.ts
View file @
81f48343
...
...
@@ -5,7 +5,7 @@ export type AllDecorators = MethodDecorator &
ClassDecorator
&
PropertyDecorator
;
export
class
Metadata
<
M
extends
StringDict
,
AM
extends
StringDict
>
{
export
class
Metadata
Setter
<
M
extends
StringDict
,
AM
extends
StringDict
>
{
private
getMetadataInDecorator
<
K
extends
MergeKey
<
M
,
AM
>
,
GM
extends
Record
<
MergeKey
<
M
,
AM
>
,
any
>
=
GenericMap
<
M
,
AM
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment