gajus/liqe

Incorrect definition of TagToken in types.ts

Open

#29 创建于 2023年2月17日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)TypeScript (27 fork)github user discovery
help wanted

仓库指标

Star
 (675 star)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南