Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

function returning never in typescript

BHASA VYAS answered on March 30, 2023 Popularity 3/10 Helpfulness 7/10

Contents


More Related Answers

  • typescript type of return value of function
  • Function Returning Value In Typescript
  • never data type in typescript
  • difference between never and void in typescript
  • typescript get return type of function
  • typescript function type assertion
  • type never

  • function returning never in typescript

    5

    // Function returning never must not have a reachable end point

    function error(message: string): never {

    throw new Error(message);

    Popularity 3/10 Helpfulness 7/10 Language typescript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Mar 30 2023
    BHASA VYAS
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.