Recently diving into Typescript, I am looking to access the isProd property through myStackObj. Specifically as myStackObj.isProd
.
interface MyStackProps {
readonly isProd? : boolean;
}
class MyStack {
constructor(props?: MyStackProps){
}
}
let myStackObj = new MyStack({isProd: true});
myStackObj.isProd
Encountering an error when trying to access myStackObj.isProd property. Any guidance on what may be incorrect in my approach would be greatly valued.