Within my TypeScript application, I currently have the following code:
interface Data {
url: string,
// more stuff
}
(...)
export class something() {
public data: Data;
}
method(){
this.data.url = "things";
}
However, every time I attempt to assign a value to data.url, I encounter an error stating that I cannot set the property url of undefined. What mistake am I making here? And what is causing this issue?
Thank you in advance!