Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update property decorators #306

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fuzzy-cycles-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inversifyjs/core": minor
---

Updated `unmanaged` to support method decoration
5 changes: 5 additions & 0 deletions .changeset/good-sheep-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inversifyjs/core": minor
---

Updated `inject` to support method decoration
5 changes: 5 additions & 0 deletions .changeset/many-jobs-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inversifyjs/core": minor
---

Updated `optional` to support method decoration
5 changes: 5 additions & 0 deletions .changeset/mighty-shrimps-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inversifyjs/core": minor
---

Updated `named` to support method decoration
5 changes: 5 additions & 0 deletions .changeset/ninety-dodos-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inversifyjs/core": minor
---

Updated `tagged` to support method decoration
5 changes: 5 additions & 0 deletions .changeset/swift-toes-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inversifyjs/core": minor
---

Updated `multiInject` to support method decoration
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,23 @@ describe(inject.name, () => {
@inject('baz')
public readonly baz!: string;

#someField!: string;

constructor(
@inject('firstParam')
public firstParam: number,
@inject('secondParam')
public secondParam: number,
) {}

public get someField(): string {
return this.#someField;
}

@inject('someField')
public set someField(value: string) {
this.#someField = value;
}
}

result = getOwnReflectMetadata(Foo, classMetadataReflectKey);
Expand Down Expand Up @@ -75,6 +86,16 @@ describe(inject.name, () => {
value: 'baz',
},
],
[
'someField',
{
kind: ClassElementMetadataKind.singleInjection,
name: undefined,
optional: false,
tags: new Map(),
value: 'someField',
},
],
]),
scope: undefined,
};
Expand Down
Loading
Loading