gajus/liqe

Incorrect definition of TagToken in types.ts

Open

#29 opened on Feb 17, 2023

 (1 comment) (0 reactions) (0 assignees)TypeScript (28 forks)github user discovery
help wanted

Repository metrics

Stars
 (682 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Problem

  • Parsing of "a" generates AST that is not consistent with definition in types.ts
  • Based on types.ts, "operation" property is NOT optional
  • Parsing of "a" generates TagToken w/o "operation" property - example here

Proposed solution

  • Fix types.ts or parser

Versions

Generated AST

{
	"location": {
		"start": 0,
		"end": 1
	},
	"field": {
		"type": "ImplicitField"
	},
	"type": "Tag",
	"expression": {
		"location": {
			"start": 0,
			"end": 1
		},
		"type": "LiteralExpression",
		"quoted": false,
		"value": "a"
	}
}

Contributor guide