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

Signature of capturePostgres is mismatched with the implementation #504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hckhanh
Copy link

@hckhanh hckhanh commented May 4, 2022

It must be equivalent to:

var capturePostgres = require('aws-xray-sdk-postgres');

I get this error when try to follow the type definition of this package with TypeScript

import { capturePostgres } from "aws-xray-sdk-postgres";

Then I get this error:

TypeError: (0 , external_aws_xray_sdk_postgres_namespaceObject.capturePostgres) is not a function

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

It must be equivalent to require import:

```js
var capturePostgres = require('aws-xray-sdk-postgres');
```

I get this error when try to follow the type definition of this package with TypeScript

```ts
import { capturePostgres } from "aws-xray-sdk-postgres";
```

Then I get this error:

```sh
TypeError: (0 , external_aws_xray_sdk_postgres_namespaceObject.capturePostgres) is not a function
```
@hckhanh hckhanh requested a review from a team as a code owner May 4, 2022 03:57
@hckhanh hckhanh changed the title capturePostgres is the default function Signature of capturePostgres is mismatched with the implementation May 4, 2022
@willarmiros
Copy link
Contributor

Hi @hckhanh it seems this change is causing linting issues could you address those?

@hckhanh
Copy link
Author

hckhanh commented Aug 20, 2022

Hi @willarmiros, the linting error is No named exports found in module './postgres_p'
I have to change the interface of the implementation to match the ESLint rule. Is that ok?

@hckhanh
Copy link
Author

hckhanh commented Aug 20, 2022

Or I simply change the lint rule to make it successed.

@willarmiros
Copy link
Contributor

I have to change the interface of the implementation to match the ESLint rule. Is that ok?

We can't make any backwards incompatible/breaking changes. I would recommend ignoring the lint rule in code and adding a comment explaining why we suppress it.

@mxdvl
Copy link

mxdvl commented Oct 3, 2024

Any chance we could get this over the line so that we can close #450?

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

Successfully merging this pull request may close these issues.

3 participants