Microsoft/TypeScript

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

开放

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

 (5 条评论) (0 个反应) (0 位负责人)TypeScript (13,395 个派生)batch import
BugDomain: APIHelp Wanted

仓库指标

星标
 (108,860 个星标)
PR 合并指标
 (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?

贡献者指南