Skip to content

Hypothesis methods: drop, test

The Hypothesis Verbs drop, test as typed SDK methods, with inputs, result, refusals and an example.

Reference for Hypothesis, one group of Hypothesis methods.

Hypothesis.drop

Drop retires a Hypothesis from active work and keeps it, with its Evidence, on record. Verb page.

TypeScript
interface HypothesisVerbs {
  drop(input: HypothesisDropInput, options?: SB.CallOptions): SB.Call<Hypothesis>
}

Emits Hypothesis.dropped.

Inputs

InputTypeRequiredDescription
hypothesisHypothesisrequiredThe Hypothesis to retire.
reasontextrequiredWhy it is dropped.

Returns

OutputTypeRequiredDescription
hypothesisHypothesisrequiredThe dropped Hypothesis.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

TypeScript
import { $ } from 'startup-builder'

const hypothesis = await $.Hypothesis.drop({ hypothesis: 'hypothesis_Z1gjx1kbtc', reason: 'Example reason' })

Hypothesis.test

Test binds a Hypothesis to the Experiment that decides it and moves the Hypothesis to testing. Verb page.

TypeScript
interface HypothesisVerbs {
  test(input: HypothesisTestInput, options?: SB.CallOptions): SB.Call<Hypothesis>
}

Emits Hypothesis.tested.

Inputs

InputTypeRequiredDescription
hypothesisHypothesisrequiredThe Hypothesis to test.
experimentExperimentrequiredThe Experiment that decides it.

Returns

OutputTypeRequiredDescription
hypothesisHypothesisrequiredThe Hypothesis, now testing.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

TypeScript
import { $ } from 'startup-builder'

const hypothesis = await $.Hypothesis.test({ hypothesis: 'hypothesis_Z1gjx1kbtc', experiment: 'experiment_IyIJJPngKt' })