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

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