Skip to content

Type inconsistency: replyToList accepts EmailJSON | EmailJSON[] in types but requires EmailJSON[] at runtime #1439

@NumanAnees

Description

@NumanAnees

Problem

There's a type inconsistency in the Mail class regarding replyToList:

Type Definition suggests both formats are valid:

replyToList?: EmailJSON | EmailJSON[],

But, Runtime Validation enforces array-only:

setReplyToList(replyToList: EmailJSON[]): void;

if (this._doArrayCheck('replyToList', replyToList) && replyToList.length) {

Impact

This inconsistency causes runtime errors

Error: Array expected for replyToList

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions