maya-dates

@drewsonne/maya-dates / Exports / Comment

Class: Comment

Represents a free form comment that can be attached to many structures.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Comment(content)

Create a new comment.

Parameters

Name Type Description
content string Initial comment text.

Defined in

comment.ts:13

Properties

content

content: string

Raw text content.

Defined in

comment.ts:6

Methods

empty

empty(): boolean

Determine whether the comment is empty.

Returns

boolean

Defined in

comment.ts:27


equals

equals(otherComment): boolean

Compare two comments by their text content.

Parameters

Name Type
otherComment Comment

Returns

boolean

Defined in

comment.ts:34


merge

merge(other): Comment

Merge this comment with another, returning a new comment instance.

Parameters

Name Type
other Comment

Returns

Comment

Defined in

comment.ts:20


toString

toString(): string

Convert the comment to a plain string.

Returns

string

Defined in

comment.ts:41