PaddingSegment Class
Packages > @fluidframework/sequence > PaddingSegment
Signature:
export declare class PaddingSegment extends BaseSegment
Extends: BaseSegment
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(size) | Constructs a new instance of the PaddingSegment class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
type | (not declared) | ||
typeString | static |
(not declared) |
Methods
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
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
Parameter | Type | Description |
---|---|---|
segment | ISegment |
Returns:
void
canAppend
Signature:
canAppend(segment: ISegment): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
segment | ISegment |
Returns:
boolean
clone
Signature:
clone(start?: number, end?: number): PaddingSegment;
Parameters
Parameter | Type | Description |
---|---|---|
start | number | |
end | number |
Returns:
createSplitSegmentAt
Signature:
protected createSplitSegmentAt(pos: number): PaddingSegment;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number |
Returns:
fromJSONObject
Signature:
static fromJSONObject(spec: any): PaddingSegment;
Parameters
Parameter | Type | Description |
---|---|---|
spec | any |
Returns:
is
Signature:
static is(segment: ISegment): segment is PaddingSegment;
Parameters
Parameter | Type | Description |
---|---|---|
segment | ISegment |
Returns:
segment is PaddingSegment
removeRange
Signature:
removeRange(start: number, end: number): boolean;
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