Skip to content

Missing Globals

Mathieu edited this page Aug 8, 2022 · 3 revisions

PipeWrench typing as complete as it is may be missing some objects and functions.

You can create a git issue to let us know which method is missing

getGlobal Function

PipeWrench-Utils has a workaround for missing globals.

import { getGlobal } from "PipeWrench-Utils"

Examples

import { getGlobal } from "PipeWrench-Utils"

// Create typing for missing global function
type RemoveItemFromDistributionFunction = (_dist: KahluaTable, _item: string, _chance: number, _dorecursive: boolean) => void

// Get the missing global function and cast the new typing on it
const RemoveItemFromDistribution = getGlobal<RemoveItemFromDistributionFunction>("RemoveItemFromDistribution")

// Get the missing global object
const SuburbsDistributions = getGlobal<KahluaTable>("SuburbsDistributions")
Clone this wiki locally