Skip to content

Commit

Permalink
feat(prisma): Improved sample manual to ignore error with TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
Castellanos, Eduard Andres (Colombia) authored and Castellanos, Eduard Andres (Colombia) committed Sep 6, 2022
1 parent a05bfca commit da56896
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 9 additions & 1 deletion sdk_contrib/prisma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,21 @@ const run = async () => {
id: 1,
},
},
// @ts-ignore
subSegment
);
const companies = await client.company.findMany(
// @ts-ignore
subSegment
);
const companies = await client.company.findMany(subSegment);
console.log(companies);
subSegment.close();
// ...
};

run();
```

# Contributors

- Eduard Castellanos <[email protected]>, <[email protected]>
6 changes: 3 additions & 3 deletions sdk_contrib/prisma/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "aws-xray-sdk-prisma",
"version": "0.0.1",
"name": "@cosva-lab/aws-xray-sdk-prisma",
"version": "3.3.7",
"description": "AWS X-Ray Patcher for prisma (Javascript)",
"author": "Cosva",
"contributors": [
"Eduard Castellanos <eduard@cosva.app>"
"Eduard Castellanos <eduard@castellanos.dev>"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion sdk_contrib/prisma/samples/manual/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ const run = async () => {
id: 1,
},
},
// @ts-ignore
subSegment
);
const companies = await client.company.findMany(
// @ts-ignore
subSegment
);
const companies = await client.company.findMany(subSegment);
console.log(companies);
subSegment.close();
const timeout = segment.addNewSubsegment('timeout');
Expand Down

0 comments on commit da56896

Please sign in to comment.