Microsoft/TypeScript

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

Aperta

#4217 aperta il 7 ago 2015

 (5 commenti) (0 reazioni) (0 assegnatari)TypeScript (13.395 fork)batch import
BugDomain: APIHelp Wanted

Metriche repository

Star
 (108.860 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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?

Guida contributor