xml-core icon indicating copy to clipboard operation
xml-core copied to clipboard

XmlElementType has non-nullable localName

Open nicreuss opened this issue 3 years ago • 0 comments

Expected behaviour

As per the README.MD, the XmlElementType should have a nullable localName field that defaults to the name of the class.

Current Behaviour

However, a typescript build fails with the following error:

error TS2345: Argument of type '{}' is not assignable to parameter of type 'XmlElementType'.
  Property 'localName' is missing in type '{}' but required in type 'XmlElementType'

Here is my tsconfig.json for reference: tsconfig.zip

Suggested fix

Changing line 152 in types.d.ts gives the expected behavior

localName?: string;

nicreuss avatar Jan 27 '22 16:01 nicreuss