mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 15:50:01 +00:00
Fix onCancel type
This commit is contained in:
parent
a65118c5c8
commit
81dc283f32
1 changed files with 2 additions and 2 deletions
|
@ -318,7 +318,7 @@ end
|
||||||
* You can set the cancellation hook at any time before resolving.
|
* You can set the cancellation hook at any time before resolving.
|
||||||
* When a promise is cancelled, calls to `resolve` or `reject` will be ignored, regardless of if you set a cancellation hook or not.
|
* When a promise is cancelled, calls to `resolve` or `reject` will be ignored, regardless of if you set a cancellation hook or not.
|
||||||
|
|
||||||
@param executor (resolve: (...: any) -> (), reject: (...: any) -> (), onCancel: (abortHandler: () -> boolean)) -> ()
|
@param executor (resolve: (...: any) -> (), reject: (...: any) -> (), onCancel: (abortHandler?: () -> ()) -> boolean) -> ()
|
||||||
@return Promise
|
@return Promise
|
||||||
]=]
|
]=]
|
||||||
function Promise.new(executor)
|
function Promise.new(executor)
|
||||||
|
@ -344,7 +344,7 @@ end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
@param executor (resolve: (...: any) -> (), reject: (...: any) -> (), onCancel: (abortHandler: () -> boolean)) -> ()
|
@param executor (resolve: (...: any) -> (), reject: (...: any) -> (), onCancel: (abortHandler?: () -> ()) -> boolean) -> ()
|
||||||
@return Promise
|
@return Promise
|
||||||
]=]
|
]=]
|
||||||
function Promise.defer(callback)
|
function Promise.defer(callback)
|
||||||
|
|
Loading…
Reference in a new issue