Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

TYPESCRIPT PIPLINE FOR THE MULTIPLE TYPE

type Result = "pass" | "fail"
 
function verify(result: Result) {
  if (result === "pass") {
    console.log("Passed")
  } else {
    console.log("Failed")
  }
}
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #TYPESCRIPT #PIPLINE #FOR #THE #MULTIPLE #TYPE
ADD COMMENT
Topic
Name
1+1 =