You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added support for Node.js version 23.
- Introduced a new workflow for automating project publishing.
- New `TimeoutError` class and timeout handling functions
(`promiseTimeout`, `runWithTimeout`) for better asynchronous control.
- Updated the README with new examples and a section on
`runWithTimeout`.
- **Bug Fixes**
- Improved clarity and consistency in usage examples in the README.
- **Documentation**
- Added a badge for Node.js version in the README.
- Updated import statements in usage examples for consistency.
- **Chores**
- Updated package version and added a new development dependency.
- Modified script to include linting before publishing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Executes a scope promise with a specified timeout duration. If the promise doesn't resolve within the timeout period, it will reject with a `TimeoutError`.
202
+
203
+
```ts
204
+
import { runWithTimeout } from'utility';
205
+
206
+
awaitrunWithTimeout(async () => {
207
+
// long run operation here
208
+
}, 1000);
173
209
```
174
210
175
211
### map
@@ -216,17 +252,17 @@ const res = utils.try(function () {
216
252
```Note``` that when you use ```typescript```, you must use the following methods to call ' Try '
0 commit comments