Source
List<Typedef> get typedefs {
if (_typeDefs != null) return _typeDefs;
Set<FunctionTypeAliasElement> elements = new Set();
elements
.addAll(_libraryElement.definingCompilationUnit.functionTypeAliases);
for (CompilationUnitElement cu in _libraryElement.parts) {
elements.addAll(cu.functionTypeAliases);
}
elements.addAll(_exportedNamespace.definedNames.values
.where((element) => element is FunctionTypeAliasElement));
elements..removeWhere(isPrivate);
_typeDefs = elements
.map((e) => new ModelElement.from(e, this))
.toList(growable: false)
..sort(byName);
return _typeDefs;
}