gajus/liqe

Incorrect definition of TagToken in types.ts

Open

#29 opened on 2023年2月17日

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)

説明

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"
	}
}

コントリビューターガイド