Skip to content

Vizel API / core/src / VizelCommentOptions

Interface: VizelCommentOptions

Defined in: packages/core/src/comment.ts:52

Configuration options for comment management

Properties

enabled?

ts
optional enabled?: boolean;

Defined in: packages/core/src/comment.ts:54

Enable comments (default: true)


key?

ts
optional key?: string;

Defined in: packages/core/src/comment.ts:58

Storage key for localStorage (default: 'vizel-comments')


onAdd?

ts
optional onAdd?: (comment) => void;

Defined in: packages/core/src/comment.ts:60

Callback when a comment is added

Parameters

ParameterType
commentVizelComment

Returns

void


onError?

ts
optional onError?: (error) => void;

Defined in: packages/core/src/comment.ts:71

Callback when an error occurs. The error may be a VizelError — narrow with isVizelError(error) to access the structured code field.

Parameters

ParameterType
errorError

Returns

void


onRemove?

ts
optional onRemove?: (commentId) => void;

Defined in: packages/core/src/comment.ts:62

Callback when a comment is removed

Parameters

ParameterType
commentIdstring

Returns

void


onReopen?

ts
optional onReopen?: (comment) => void;

Defined in: packages/core/src/comment.ts:66

Callback when a comment is reopened

Parameters

ParameterType
commentVizelComment

Returns

void


onResolve?

ts
optional onResolve?: (comment) => void;

Defined in: packages/core/src/comment.ts:64

Callback when a comment is resolved

Parameters

ParameterType
commentVizelComment

Returns

void


storage?

ts
optional storage?: VizelCommentStorage;

Defined in: packages/core/src/comment.ts:56

Storage backend (default: 'localStorage')

Released under the MIT License.