reset

View as MarkdownOpen in Claude

Clear all top-level sections from the builder, returning it to an empty initial state. Also clears the internal section lookup map used by hasSection() and getSection().

Returns

this — returns the builder for fluent chaining.

Example

1import { PomBuilder } from '@signalwire/sdk';
2
3const pom = new PomBuilder();
4pom.addSection('Intro', { body: 'Welcome.' });
5pom.addSection('Rules', { bullets: ['Be nice.', 'Stay on topic.'] });
6
7pom.reset();
8console.log(pom.renderMarkdown()); // "" (empty)