Skip to content 

PaddingSegment Class

Packages > @fluidframework/sequence > PaddingSegment

Signature:

export declare class PaddingSegment extends BaseSegment 

Extends: BaseSegment

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(size) Constructs a new instance of the PaddingSegment class

Properties

List of properties for this class
Property Modifiers Type Description
type (not declared)
typeString static (not declared)

Methods

List of methods on this class
Method Modifiers Description
append(segment)
canAppend(segment)
clone(start, end)
createSplitSegmentAt(pos)
fromJSONObject(spec) static
is(segment) static
removeRange(start, end)
toJSONObject()
toString()

Constructors

PaddingSegment.(constructor)

Constructs a new instance of the PaddingSegment class

Signature:

constructor(size: number);

Parameters

List of parameters
Parameter Type Description
size number

Properties

type

Signature:

readonly type = "PaddingSegment";

typeString

Signature:

static readonly typeString = "PaddingSegment";

Methods

append

Signature:

append(segment: ISegment): void;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

void

canAppend

Signature:

canAppend(segment: ISegment): boolean;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

boolean

clone

Signature:

clone(start?: number, end?: number): PaddingSegment;

Parameters

List of parameters
Parameter Type Description
start number
end number

Returns:

PaddingSegment

createSplitSegmentAt

Signature:

protected createSplitSegmentAt(pos: number): PaddingSegment;

Parameters

List of parameters
Parameter Type Description
pos number

Returns:

PaddingSegment

fromJSONObject

Signature:

static fromJSONObject(spec: any): PaddingSegment;

Parameters

List of parameters
Parameter Type Description
spec any

Returns:

PaddingSegment

is

Signature:

static is(segment: ISegment): segment is PaddingSegment;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

segment is PaddingSegment

removeRange

Signature:

removeRange(start: number, end: number): boolean;

Parameters

List of parameters
Parameter Type Description
start number
end number

Returns:

boolean

toJSONObject

Signature:

toJSONObject(): {
        pad: number;
        props: PropertySet;
    };

Returns:

{ pad: number; props: PropertySet; }

toString

Signature:

toString(): string;

Returns:

string