Skip to content

Parser should reject import.defer?.('x') optional invocation #4789

Description

@BhariGowda

Problem

import.defer?.('x') produces no error in TypeScript, but all
major parsers (Oxc, SWC, Babel, Acorn) reject it.

Related: microsoft/TypeScript#63679
Fix attempted in JS repo: microsoft/TypeScript#63690

Expected

error: 'import.defer' does not support optional invocation

Actual

No error produced

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions