@servicenow/sdk - v4.4.1
    Preparing search index...
    interface BodyableNode {
        addBody(): this;
        getBody(): Node<tsc.Node> | undefined;
        getBodyOrThrow(message?: string | (() => string)): Node;
        getBodyText(): string | undefined;
        hasBody(): boolean;
        removeBody(): this;
        setBodyText(textOrWriterFunction: string | WriterFunction): this;
    }
    Index

    Methods

    • Adds a body if it doesn't exists.

      Returns this

    • Gets the body if it exists.

      Returns Node<tsc.Node> | undefined

    • Gets the body or throws an error if it doesn't exist.

      Parameters

      • Optionalmessage: string | (() => string)

      Returns Node

    • Gets the body text without leading whitespace, leading indentation, or trailing whitespace. Returns undefined if there is no body.

      Returns string | undefined

    • Gets if the node has a body.

      Returns boolean

    • Removes the body if it exists.

      Returns this

    • Sets the body text. A body is required to do this operation.

      Parameters

      • textOrWriterFunction: string | WriterFunction

        Text or writer function to set as the body.

      Returns this