expect
@hyperledger/identus-sdk v7.0.0
@hyperledger/identus-sdk / overview / Utils / expect
Function: expect()
expect<
T>(value:T,error?:string|Error|Ctor<Error>):Exclude<T,Nil>
Defined in: src/utils/guards.ts:119
expect assert a value is notNil and return the value typed as such panic otherwise
Type Parameters
| Type Parameter | 
|---|
| T | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| value | T | the value to check | 
| error? | string|Error|Ctor<Error> | custom error | 
Returns
Exclude<T, Nil>