Skip to content

"This expression is not callable." #544

@khansudarsan

Description

@khansudarsan

https://github.com/wa0x6e/cal-heatmap/blob/279e4eea42e962daf710ec721871cd5ffca97907/src/calendar/Populator.ts#L37

This expression is not callable. Not all constituents of type 'string | ((timestamp: number, value: string | number | null | undefined, backgroundColor: string) => string)' are callable. Type 'string' has no call signatures.ts(2349) Cannot invoke an object which is possibly 'null'.ts(2721) 'color' is possibly 'null'.ts(18047)

let color: string | ((timestamp: Timestamp, value: number | string | null | undefined, backgroundColor: string) => string) | null

color has two types which is not callable but in the mentioned line above, it's been called without taking care of string and null type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions