edoc: properly detect typespec before function