BeerMoneyDev / nest-aws-sdk

A thin wrapping layer around the aws-sdk package for clean NestJS dependency injection.
MIT License
93 stars 13 forks source link

TypeScript v5 support #24

Closed barna-ohana closed 3 weeks ago

barna-ohana commented 1 year ago

Currently, building with TypeScript v5 will throw the following error:

Unable to resolve signature of parameter decorator when called as an expression.
  Argument of type 'undefined' is not assignable to parameter of type 'string | symbol'.

    @InjectAwsService(SES) private readonly _ses: SES,
armingdev commented 1 year ago

Any updates on this one? Have the same issue.

KerryRitter commented 1 year ago

I haven't been able to get to this. I am happy to accept a PR!

EugeneKorshenko commented 1 year ago

This tiny patch may help before the PR:

diff --git a/dist/lib/aws-service.decorator.d.ts b/dist/lib/aws-service.decorator.d.ts
index f6e71eadcf483eee4e2f10a56ea8c33f22673ca2..af1f6a0c65946a357c69144077d97f4945e4a5b8 100644
--- a/dist/lib/aws-service.decorator.d.ts
+++ b/dist/lib/aws-service.decorator.d.ts
@@ -1,2 +1,2 @@
 import { AwsService, AwsServiceType } from './types';
-export declare const InjectAwsService: (serviceConstructor: AwsServiceType<AwsService>) => (target: object, key: string | symbol, index?: number) => void;
+export declare const InjectAwsService: (serviceConstructor: AwsServiceType<AwsService>) => PropertyDecorator & ParameterDecorator;
abdulkaderelrawas commented 3 weeks ago

any news about merging this PR 😄 ?

KerryRitter commented 3 weeks ago

it took a lifetime, but got it merged :) thanks for the contribution and patience