TypeScript Hindi Tutorial #16 Never in TypeScript
Never Data Type in JS
never.ts
function loopFunction():never{
while (true) {
console.log("loop")
}
}
function simple1():never {
throw new Error("output and data not found");
}
never.js
"use strict";
function loopFunction() {
while (true) {
console.log("loop");
}
}
function simple1() {
throw new Error("output and data not found");
}
simple1();