[3.9] Add typehint on thesaurus functions