Skip to content

Implement Promise.try(func, arg1, arg2, /* …, */ argN)#180

Open
retyui wants to merge 2 commits intothen:masterfrom
retyui:feat/retyui/try
Open

Implement Promise.try(func, arg1, arg2, /* …, */ argN)#180
retyui wants to merge 2 commits intothen:masterfrom
retyui:feat/retyui/try

Conversation

@retyui
Copy link
Contributor

@retyui retyui commented Jan 28, 2026

Promise.try(fn, ...args) :

The Promise.try() static method takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result in a Promise.

Promise.try(() => func(arg1, arg2));
// or you can do this 
Promise.try(func, arg1, arg2);

error: [email protected]: The engine "node" is incompatible with this module. Expected version "^18.18.0 || ^20.9.0 || >=21.1.0". Got "14.21.3"
@rollingversions
Copy link

There is no change log for this pull request yet.

Create a changelog

@retyui
Copy link
Contributor Author

retyui commented Jan 28, 2026

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.

1 participant