Module: features/resources/resource
Components
Interfaces
Functions
createResource
▸ createResource<T
>(defaultValue
, displayName?
, precision?
, small?
): Resource
<T
>
Type parameters
Name | Type |
---|---|
T | extends State |
Parameters
Name | Type | Default value |
---|---|---|
defaultValue | T | Ref <T > | undefined |
displayName | string | "points" |
precision | number | 0 |
small | undefined | undefined |
Returns
Resource
<T
>
displayResource
▸ displayResource(resource
, overrideAmount?
): string
Parameters
Name | Type |
---|---|
resource | Resource <DecimalSource > |
overrideAmount? | DecimalSource |
Returns
string
trackBest
▸ trackBest(resource
): Ref
<DecimalSource
>
Parameters
Name | Type |
---|---|
resource | Resource <DecimalSource > |
Returns
Ref
<DecimalSource
>
trackOOMPS
▸ trackOOMPS(resource
, pointGain?
): Ref
<string
>
Parameters
Name | Type |
---|---|
resource | Resource <DecimalSource > |
pointGain? | ComputedRef <DecimalSource > |
Returns
Ref
<string
>
trackTotal
▸ trackTotal(resource
): Ref
<DecimalSource
>
Parameters
Name | Type |
---|---|
resource | Resource <DecimalSource > |
Returns
Ref
<DecimalSource
>
unwrapResource
▸ unwrapResource(resource
): Resource
Parameters
Name | Type |
---|---|
resource | ProcessedComputable <Resource <DecimalSource >> |