UNPKG
openam-agent-custom
Version:
latest (1.2.0)
1.2.0
1.0.1
1.0.0
Customized ForgeRock AM Policy Agent for Node.js from Zoltan Tarcsay
openam-agent-custom
/
src
/
utils
/
deferred.ts
13 lines
(11 loc)
•
265 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
export
class
Deferred
<R =
any
> {
promise
:
Promise
<R>;
resolve
:
(
result
: R
) =>
any
;
reject
:
(
error
:
any
) =>
any
;
constructor
(
) {
this
.
promise
=
new
Promise
(
(
resolve, reject
) =>
{
this
.
resolve
= resolve;
this
.
reject
= reject; }); } }