component.ts
import * as AssetId from "../../../assetid.json";
export class AssetID {
abc: number;
xxx: number;
}
export class Sample {
public assetId: AssetID = AssetId; // Line no : 9
}
assetid.json
{
"abc": 3,
"xxx": 4
}
In line # 9 it creates an error like
TS2322: Type 'typeof ".json"' is not assignable to type 'AssetID'. Property 'abc' is missing in type 'typeof ".json"'
I wanted to map this json format to void 'any'
type in the typescript code.