Microsoft/TypeScript

TypeChecker#getConstantValue(node) doesn't properly resolve values

Open

#4,217 创建于 2015年8月7日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)TypeScript (6,726 fork)batch import
BugDomain: APIHelp Wanted

仓库指标

Star
 (48,455 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 9 个 PR)

描述

Courtesy of @ivogabe from here.

I'm working with the compiler api and I noticed that TypeChecker#getConstantValue(node) only returns a value if I first call TypeChecker#getSymbolAtLocation(node). node is an ElementAccessExpression or a PropertyAccessExpression. Is that a bug or by design?

贡献者指南