Skip to content

Print warning when two Dates are compared #17119

Closed
@adius

Description

@adius

Code

const dateA = new Date()
const dateB = new Date()

if (dateA === dateB) {
  console.log('Can I haz warning?')
}

Expected behavior:
TypeScript compiler prints a warning because comparing if dateA and dateB are the same Date object is probably not what I want to do.

Actual behavior:
Nothing happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions