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

Typescript Definitions #14

Closed
glicht opened this issue Jan 6, 2018 · 12 comments
Closed

Typescript Definitions #14

glicht opened this issue Jan 6, 2018 · 12 comments

Comments

@glicht
Copy link
Contributor

glicht commented Jan 6, 2018

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

@haotianw465
Copy link
Contributor

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.

@piersmacdonald
Copy link

piersmacdonald commented Aug 24, 2018

Lacking Typescript and Node 8+ support isn't great for a non-beta AWS product. This is where modern JS is heading.

@QuiquiTheKappa
Copy link

I also would love to see typescript definitions soon as our company is dependent on aws and typescript.

@voxpelli
Copy link
Contributor

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

@alex-at-cascade
Copy link

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.

@kerbyferris
Copy link

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;
  ...
}

@sergiovm
Copy link

sergiovm commented Jun 5, 2019

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...

@woodsae
Copy link

woodsae commented Jul 19, 2019

I would really like to see this done as well.

@onionhammer
Copy link
Contributor

Where are the type definitions?

@esilkensen
Copy link
Contributor

Hi everyone, I've just opened #207 🙂

@willarmiros
Copy link
Contributor

TypeScript definitions have been released in v2.5.0!

@esilkensen
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests