Skip to content

Commit 014e2e9

Browse files
committed
Better types.
1 parent 9facdd5 commit 014e2e9

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# CHANGELOG
22

3+
## 2.0.6 (December 2, 2020)
4+
5+
- Better types definition for get.
6+
37
## 2.0.5 (October 27, 2020)
48

5-
- publish
9+
- publish.
610

711
## 2.0.4 (October 27, 2020)
812

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-execution-context",
3-
"version": "2.0.5",
3+
"version": "2.0.6",
44
"description": "Provides execution context wrapper for node JS, can be used to create execution wrapper for handling requests and more",
55
"author": "Oded Goldglas <odedglas@gmail.com>",
66
"license": "ISC",

src/ExecutionContext/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ const handleError = (code) => {
4343
console.error(code); // eslint-disable-line no-console
4444
};
4545

46+
/**
47+
* @type {ExecutionContextAPI}
48+
*/
4649
class ExecutionContext {
4750
constructor() {
4851
this.config = { ...DEFAULT_CONFIG };

src/ExecutionContext/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface ExecutionContextAPI {
2929
/**
3030
* Gets the current async process execution context.
3131
*/
32-
get(): object;
32+
get<T>(): T;
3333

3434
/**
3535
* Runs a given function within an async resource context

0 commit comments

Comments
 (0)