-
-
Notifications
You must be signed in to change notification settings - Fork 335
Closed
Description
after upgrading we encounter the following error from TSC
src/xml.ts(102,7): error TS7053: Element implicitly has an 'any' type because expression of type '"?xml"' can't be used to index type 'GenericObjectOrArray<unknown>'.
Property '?xml' does not exist on type 'GenericObjectOrArray<unknown>'.
src/xml.ts(103,12): error TS7053: Element implicitly has an 'any' type because expression of type '"?xml"' can't be used to index type 'GenericObjectOrArray<unknown>'.
Property '?xml' does not exist on type 'GenericObjectOrArray<unknown>'.
src/xml.ts(108,21): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'GenericObjectOrArray<unknown>'.
No index signature with a parameter of type 'string' was found on type 'GenericObjectOrArray<unknown>'.
in previous version, parse() returns any so we were able to index it
const parsedXml = parser.parse(str);
// Remove the <?xml version="..." ?> node.
// This is a change in behavior on fxp v4. Issue #424
if (parsedXml["?xml"]) {
delete parsedXml["?xml"];
}larshp and jmopel
Metadata
Metadata
Assignees
Labels
No labels