removeStep

View as MarkdownOpen in Claude

Remove a step from this context entirely.

Parameters

name
stringRequired

Name of the step to remove.

Returns

Context — Self for method chaining.

Example

import { ContextBuilder } from '@signalwire/sdk';
const builder = new ContextBuilder();
const ctx = builder.addContext('default');
ctx.addStep('greet').setText('Greet the caller.');
ctx.addStep('obsolete_step').setText('This step is no longer needed.');
ctx.addStep('farewell').setText('Thank the caller and say goodbye.');
ctx.removeStep('obsolete_step');