Hey guys, this might seem like a stupid question but how are you meant to make a string readonly in ts ?
I have tried to use Readonly<T> and readonly but that only work for object. What about primitive data type like string and boolean etc... ?
const hello = (name: string)=>{
name = "CHANGED"; // this line should error out.
console.log(name); // will log "CHANGED"
}
hello("hello")