forked from profectus/Profectus
Cleaned up docs
This commit is contained in:
parent
21e739070d
commit
db304dea43
7 changed files with 13 additions and 22 deletions
|
@ -12,12 +12,10 @@ import { createLazyProxy } from "util/proxies";
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { computed, unref } from "vue";
|
import { computed, unref } from "vue";
|
||||||
|
|
||||||
/**
|
/** An object that configures a {@link Conversion}. */
|
||||||
* An object that configures a {@link conversion}.
|
|
||||||
*/
|
|
||||||
export interface ConversionOptions {
|
export interface ConversionOptions {
|
||||||
/**
|
/**
|
||||||
* The scaling function that is used to determine the rate of conversion from one {@link resource} to the other.
|
* The scaling function that is used to determine the rate of conversion from one {@link Resource} to the other.
|
||||||
*/
|
*/
|
||||||
scaling: ScalingFunction;
|
scaling: ScalingFunction;
|
||||||
/**
|
/**
|
||||||
|
@ -43,11 +41,11 @@ export interface ConversionOptions {
|
||||||
*/
|
*/
|
||||||
nextAt?: Computable<DecimalSource>;
|
nextAt?: Computable<DecimalSource>;
|
||||||
/**
|
/**
|
||||||
* The input {@link resource} for this conversion.
|
* The input {@link Resource} for this conversion.
|
||||||
*/
|
*/
|
||||||
baseResource: Resource;
|
baseResource: Resource;
|
||||||
/**
|
/**
|
||||||
* The output {@link resource} for this conversion. i.e. the resource being generated.
|
* The output {@link Resource} for this conversion. i.e. the resource being generated.
|
||||||
*/
|
*/
|
||||||
gainResource: Resource;
|
gainResource: Resource;
|
||||||
/**
|
/**
|
||||||
|
@ -101,9 +99,7 @@ export interface BaseConversion {
|
||||||
convert: VoidFunction;
|
convert: VoidFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** An object that converts one {@link Resource} into another at a given rate. */
|
||||||
* An object that converts one {@link resource} into another at a given rate.
|
|
||||||
*/
|
|
||||||
export type Conversion<T extends ConversionOptions> = Replace<
|
export type Conversion<T extends ConversionOptions> = Replace<
|
||||||
T & BaseConversion,
|
T & BaseConversion,
|
||||||
{
|
{
|
||||||
|
@ -117,9 +113,7 @@ export type Conversion<T extends ConversionOptions> = Replace<
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
|
|
||||||
/**
|
/** A type that matches any valid {@link Conversion} object. */
|
||||||
* A type that matches any {@link conversion} object.
|
|
||||||
*/
|
|
||||||
export type GenericConversion = Replace<
|
export type GenericConversion = Replace<
|
||||||
Conversion<ConversionOptions>,
|
Conversion<ConversionOptions>,
|
||||||
{
|
{
|
||||||
|
|
|
@ -128,7 +128,7 @@ const playerHandler: ProxyHandler<Record<PropertyKey, any>> = {
|
||||||
};
|
};
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/** Augment the window object so the player can be accessed from the console */
|
/** Augment the window object so the player can be accessed from the console. */
|
||||||
interface Window {
|
interface Window {
|
||||||
player: Player;
|
player: Player;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,7 @@ watch(
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/**
|
/**
|
||||||
* Augment the window object so the settings, and hard resetting the settings,
|
* Augment the window object so the settings, and hard resetting the settings, can be accessed from the console.
|
||||||
* can be accessed from the console
|
|
||||||
*/
|
*/
|
||||||
interface Window {
|
interface Window {
|
||||||
settings: Settings;
|
settings: Settings;
|
||||||
|
|
|
@ -8,7 +8,7 @@ export interface Transient {
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/** Augment the window object so the transient state can be accessed from the console */
|
/** Augment the window object so the transient state can be accessed from the console. */
|
||||||
interface Window {
|
interface Window {
|
||||||
state: Transient;
|
state: Transient;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,15 +9,14 @@ import { useToast } from "vue-toastification";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/**
|
/**
|
||||||
* Augment the window object so
|
* Augment the window object so the vue app and project info can be accessed from the console.
|
||||||
* the vue app and project info can be accessed from the console
|
|
||||||
*/
|
*/
|
||||||
interface Window {
|
interface Window {
|
||||||
vue: VueApp;
|
vue: VueApp;
|
||||||
projInfo: typeof projInfo;
|
projInfo: typeof projInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Fix for typedoc treating import functions as taking AssertOptions instead of GlobOptions */
|
/** Fix for typedoc treating import functions as taking AssertOptions instead of GlobOptions. */
|
||||||
interface AssertOptions {
|
interface AssertOptions {
|
||||||
as: string;
|
as: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const {
|
||||||
export type DecimalSource = RawDecimalSource;
|
export type DecimalSource = RawDecimalSource;
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/** Augment the window object so the big num functions can be access from the console */
|
/** Augment the window object so the big num functions can be access from the console. */
|
||||||
interface Window {
|
interface Window {
|
||||||
Decimal: typeof Decimal;
|
Decimal: typeof Decimal;
|
||||||
exponentialFormat: (num: DecimalSource, precision: number, mantissa: boolean) => string;
|
exponentialFormat: (num: DecimalSource, precision: number, mantissa: boolean) => string;
|
||||||
|
|
|
@ -127,8 +127,7 @@ window.onbeforeunload = () => {
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/**
|
/**
|
||||||
* Augment the window object so the save function,
|
* Augment the window object so the save function, and the hard reset function can be access from the console.
|
||||||
* and the hard reset function can be access from the console
|
|
||||||
*/
|
*/
|
||||||
interface Window {
|
interface Window {
|
||||||
save: VoidFunction;
|
save: VoidFunction;
|
||||||
|
|
Loading…
Reference in a new issue