Computer scienceProgramming languagesTypeScriptData TypesBasic Types

Never and unknown

Theory

Never returns

Report a typo

Order the below TypeScript function neverReturns that takes no arguments and never returns. Watch out for the indentations.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                function neverReturns(): never {
              
                }; // outer
              
                } // inner
              
                // Infinite loop
              
                while (true) {
              

Create a free account to access the full topic