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?

貢獻者指南