Skip to content

Profectus / features/conversion / createConversion

Function: createConversion() ​

createConversion<T>(optionsFunc): object & Omit<Omit<T, "baseResource" | "gainResource" | "formula" | "currentGain" | "actualGain" | "currentAt" | "nextAt" | "convert" | "spend" | "buyMax" | "onConvert">, keyof ConversionOptions> & object

Lazily creates a conversion with the given options. You typically shouldn't use this function directly. Instead use one of the other conversion constructors, which will then call this.

Type Parameters ​

• T extends ConversionOptions

Parameters ​

optionsFunc ​

() => T

Conversion options.

Returns ​

object & Omit<Omit<T, "baseResource" | "gainResource" | "formula" | "currentGain" | "actualGain" | "currentAt" | "nextAt" | "convert" | "spend" | "buyMax" | "onConvert">, keyof ConversionOptions> & object

See ​

Defined in ​

profectus/src/features/conversion.ts:144