Skip to content

CostEstimator

CostEstimator estimates variable sizes and custom call costs.

estimateCallCost(functionName, overloadId, target, args): CallEstimate | undefined

estimateCallCost returns a custom cost estimate for a function call when one is available.

string

string

AstNode | undefined

AstNode[]

CallEstimate | undefined


estimateSize(element): SizeEstimate | undefined

estimateSize returns a size hint for a variable-width value when one is available.

AstNode

SizeEstimate | undefined