Skip to content

Commit

Permalink
breaking: fix incorrect typescript types
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonmleigh committed Nov 25, 2024
1 parent 3b89008 commit afd3bc7
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/full_sdk/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as express from 'aws-xray-sdk-express';
import { captureMySQL } from 'aws-xray-sdk-mysql';
import { capturePostgres } from 'aws-xray-sdk-postgres';
import captureMySQL from 'aws-xray-sdk-mysql';
import capturePostgres from 'aws-xray-sdk-postgres';

export * from 'aws-xray-sdk-core';

Expand Down
4 changes: 2 additions & 2 deletions packages/full_sdk/test-d/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as express from 'aws-xray-sdk-express';
import { captureMySQL } from 'aws-xray-sdk-mysql';
import { capturePostgres } from 'aws-xray-sdk-postgres';
import captureMySQL from 'aws-xray-sdk-mysql';
import capturePostgres from 'aws-xray-sdk-postgres';
import { expectType } from 'tsd';
import * as AWSXRay from '../lib';

Expand Down
3 changes: 2 additions & 1 deletion packages/mysql/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './mysql_p';
import captureMySQL from './mysql_p';
export = captureMySQL;
3 changes: 2 additions & 1 deletion packages/mysql/lib/mysql_p.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as AWSXRay from 'aws-xray-sdk-core';
import * as MySQL from 'mysql';

export function captureMySQL(mysql: typeof MySQL): captureMySQL.PatchedMySQL;
declare function captureMySQL(mysql: typeof MySQL): captureMySQL.PatchedMySQL;
export = captureMySQL;

declare namespace captureMySQL {
interface PatchedQueryFunction {
Expand Down
2 changes: 1 addition & 1 deletion packages/mysql/test-d/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as AWSXRay from 'aws-xray-sdk-core';
import * as MySQL from 'mysql';
import { expectType } from 'tsd';
import { captureMySQL } from '../lib';
import captureMySQL from '../lib';

const segment = AWSXRay.getSegment();

Expand Down
3 changes: 2 additions & 1 deletion packages/postgres/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './postgres_p';
import capturePostgres from './postgres_p';
export = capturePostgres
3 changes: 2 additions & 1 deletion packages/postgres/lib/postgres_p.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as AWSXRay from 'aws-xray-sdk-core';
import * as PG from 'pg';

export function capturePostgres(pg: typeof PG): capturePostgres.PatchedPostgres;
declare function capturePostgres(pg: typeof PG): capturePostgres.PatchedPostgres
export = capturePostgres;

declare namespace capturePostgres {
interface CaptureQueryMethod {
Expand Down
2 changes: 1 addition & 1 deletion packages/postgres/test-d/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as AWSXRay from 'aws-xray-sdk-core';
import * as PG from 'pg';
import { expectType } from 'tsd';
import { capturePostgres } from '../lib';
import capturePostgres from '../lib';

const segment = AWSXRay.getSegment();

Expand Down

0 comments on commit afd3bc7

Please sign in to comment.