Skip to content

Cannot assign null for class attributes in models. #41

@AshenI99

Description

@AshenI99

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'.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions