Within my TypeScript code, I have the following interface:
export interface Defined {
4475355962119: number[];
4475355962674: number[];
}
I am trying to create objects based on this interface Defined
:
let defined = new Defined();
defined['4475355962119'] = [1];
defined['4475355962674'] = [2];
However, I am facing issues with this approach!
Perhaps I should define the interface like this:
export interface Defined {
array(number): number[];
}
In addition, I have a JSON object that I need to use to create JavaScript objects:
"parameters": {
"defined": {
4475355962119: [
9547,
9871
],
4475355962674: [
9829
]
}
}