gajus/liqe

Incorrect definition of TagToken in types.ts

Open

#29 opened on Feb 17, 2023

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (27 forks)github user discovery
help wanted

Repository metrics

Stars
 (675 stars)
PR merge metrics
 (PR metrics pending)

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