Microsoft/TypeScript

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

Ouverte

#4 217 ouverte le 7 août 2015

 (5 commentaires) (0 réaction) (0 personne assignée)TypeScript (13 395 forks)batch import
BugDomain: APIHelp Wanted

Métriques du dépôt

Stars
 (108 860 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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?

Guide contributeur