Skip to main content

Function: checkAdapterContract()

checkAdapterContract<T>(a, o): Promise<void>

Defined in: packages/sdvplot/src/testing/index.ts:150

Port of Python sdvplot.testing.check_adapter_contract (rules 0-8), plus rule 9: no verb mutates its input (the target's plain-data part and the position and value arrays, deep-frozen). Rejects with a ContractError naming the first rule broken. Warnings are once per call (one message listing every unresolved value). Resets the warning handler to null (the default) when done: the previous handler cannot be restored.

Type Parameters​

T​

T

Parameters​

a​

ContractAdapter<T>

o​

ContractOptions<T>

Returns​

Promise<void>