Reputation: 17
I am trying to use variable which is as below:
var Storage: { Id: string; Sequence: string[]; } =???
without initializing if I am trying to use it is throwing undefined/null exception. How to initialized the above? I tried something like:
var Storage: { Id: string; Sequence: string[]; } = {null;[]};
But no luck.
Thanks.
Upvotes: 0
Views: 421
Reputation: 6091
Try this:
var storage: { Id: string; Sequence: string[]; } = { Id: null, Sequence: [] };
Upvotes: 2