You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importfastxmlfrom'fast-xml-parser';functionparse(pXMLString: string): any{if(fastxml.validate(pXMLString)===true){returnfastxml.parse(pXMLString,{attributeNamePrefix: '',ignoreAttributes: false,stopNodes: ['onentry','onexit','transition'],});}thrownewError("That doesn't look like valid xml ...\n");}
Output
When compiling the code, the typescript compiler complains stopNodes doesn't exist on Partial<X2jOptions>.
(Demo repo over herenpm i && npm run build to reproduce)
Root cause seems that X2jOptions in src/parser.d.ts doesn't yet contain the stopNodes attribute that was introduced in #150.
src/parseit.ts:8:7 - error TS2345: Argument of type '{ attributeNamePrefix: string; ignoreAttributes: false; stopNodes: string[]; }' is not assignable to parameter of type 'Partial<X2jOptions>'.
Object literal may only specify known properties, and 'stopNodes' does not exist in type 'Partial<X2jOptions>'.
8 stopNodes: ['onentry', 'onexit', 'transition'],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
expected data
The code compiles without warnings.
Would you like to work on this issue?
Yes
No
The text was updated successfully, but these errors were encountered:
Checklist
Input
Code
Output
When compiling the code, the typescript compiler complains stopNodes doesn't exist on
Partial<X2jOptions>
.(Demo repo over here
npm i && npm run build
to reproduce)Root cause seems that
X2jOptions
in src/parser.d.ts doesn't yet contain the stopNodes attribute that was introduced in #150.expected data
The code compiles without warnings.
Would you like to work on this issue?
The text was updated successfully, but these errors were encountered: