Hi,
Are there anywhere typescript definitions for this project?
If not, do you have any plans to provide typescript definitions in the future?
thanks,
Guy
Hi, the SDK currently doesn't have typescript definitions available yet. We will looking into providing the definitions but we cannot guarantee such offering nor a timeline. Please stay tuned.
Lacking Typescript and Node 8+ support isn't great for a non-beta AWS product. This is where modern JS is heading.
I also would love to see typescript definitions soon as our company is dependent on aws and typescript.
Definitions are getting increasingly common among projects and since Typescript at least nowadays can also be used to lint pure js I think it's a very good suggestion.
However: Anyone can contribute type definitions for this package to the @DefinitelyTyped project: https://github.com/DefinitelyTyped/DefinitelyTyped#create-a-new-package
This would be very nice to have, as it's very frustrating how the AWSXRay.captureAWS(...) call obscures the valuable .d.ts declarations provided by the AWS sdk.
As a workaround, generics can help. Creating a aws-xray-sdk.d.ts types file with something like the following will satisfy the compiler without obscuring AWS sdk declarations:
declare module "aws-xray-sdk" {
export function captureAWSClient<T>(client: T): T;
...
}
Definitions are getting increasingly common among projects and since Typescript at least nowadays can also be used to lint pure js I think it's a very good suggestion.
However: Anyone can contribute type definitions for this package to the @DefinitelyTyped project: https://github.com/DefinitelyTyped/DefinitelyTyped#create-a-new-package
Somebody created a basic definition here:
https://github.com/mziyabo-aws/aws-xray-typings
Not perfect though...
I would really like to see this done as well.
Where are the type definitions?
Hi everyone, I've just opened #207 馃檪
TypeScript definitions have been released in v2.5.0!
I think it's correct for it to be a dependency, because the Namespace type is imported from that package and exported as the return type of the public getNamespace() function -- that said, since #227 was merged this should probably be updated to use @types/cls-hooked -- I can open a PR for that.
Most helpful comment
Lacking Typescript and Node 8+ support isn't great for a non-beta AWS product. This is where modern JS is heading.