TypeScript nedir, ne işe yarar ?
const message = "hello!";
message();
/* This expression is not callable.
Type 'String' has no call signatures. */const user = {
name: "Daniel",
age: 26,
};
console.log(user.location);Last updated
const message = "hello!";
message();
/* This expression is not callable.
Type 'String' has no call signatures. */const user = {
name: "Daniel",
age: 26,
};
console.log(user.location);Last updated
const value = Math.random() < 0.5 ? "a" : "b";
if (value !== "a") {
// ...
} else if (value === "b") {
// ...
}
/*This condition will always return
'false' since the types '"a"' and '"b"' have no overlap.*/