Microsoft/TypeScript

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

Open

#4,217 opened on 2015年8月7日

GitHub で見る
 (5 comments) (0 reactions) (0 assignees)TypeScript (6,726 forks)batch import
BugDomain: APIHelp Wanted

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (平均マージ 6d 17h) (30d で 9 merged PRs)

説明

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?

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