Use JSDoc . You should document your method as follows /** * Sample method description * @param name {('PossibleValue1' | 'PossibleValue2' | 'PossibleValue3')} */ function showName ( name ) { console .log(name); } I'm not sure what IDE you are using, but I'm sure this will work with most IDEs.