The grammar prohibits optional parameters with a string literal type · Issue #399 · microsoft/TypeScript · GitHub
Skip to content

The grammar prohibits optional parameters with a string literal type #399

Description

@JsonFreeman

The grammar prohibits the following signature:

(x?: "hi");

But both implementations allow it, and it is reasonable. The nonterminal OptionalParameter needs to be augmented to allow it.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueSpecIssues related to the TypeScript language specification

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions