use of com.google.javascript.jscomp.newtypes.Namespace in project closure-compiler by google.
the class NTIScope method getNamespaceOrTypedefType.
@Override
public JSType getNamespaceOrTypedefType(String typeName) {
Namespace ns = getNamespaceAfterFreezing(typeName);
if (ns != null) {
return ns.toJSType();
}
Typedef td = getTypedef(typeName);
return td == null ? null : td.getType();
}
use of com.google.javascript.jscomp.newtypes.Namespace in project closure-compiler by google.
the class SimpleInference method inferPrototypeProperty.
private JSType inferPrototypeProperty(Node recv, String pname, NTIScope scope) {
QualifiedName recvQname = QualifiedName.fromNode(recv);
Declaration decl = scope.getDeclaration(recvQname, false);
if (decl != null) {
Namespace ns = decl.getNamespace();
if (ns instanceof RawNominalType) {
return ((RawNominalType) ns).getProtoPropDeclaredType(pname);
}
}
return null;
}
Aggregations