Search Terms
#36239
Suggestion
Allow non returning functions to have contextually required undefined return type.
Use Cases
Examples
declarefunctionf(a: ()=>undefined): void;f(()=>{});// error -> okf((): undefined=>{});// error -> okconstg1: ()=>undefined=()=>{};// error -> okconstg2=(): undefined=>{};// error -> ok if possiblefunctionh1(){}f(h1);// error -> errorfunctionh2(): undefined{// error -> ok if possible}Checklist
My suggestion meets these guidelines:
Search Terms
#36239
Suggestion
Allow non returning functions to have contextually required
undefinedreturn type.Use Cases
Examples
Checklist
My suggestion meets these guidelines: