Problem
Getting an error while assigning null for class attributes in models. But it is working when we replace null with empty string.
{
spec: NFT_SPEC,
name: NFT_NAME,
symbol: NFT_SYMBOL,
icon: null,
base_uri: null,
reference: null,
...
}
ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'.
Problem
Getting an error while assigning
nullfor class attributes in models. But it is working when we replacenullwithemptystring.ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'.