Currently, using preserveChildrenOrder = true will make every node have a #name property containing their tag name.
With the latest iteration of JavaScript, variable names starting with an # will now be considered private properties by default.
This makes creating TypeScript interfaces with this property impossible and may also be a breaking change in next-gen browsers supporting the private field feature.
Example TypeScript code:
export interface ScrapNode {
#name: string;
}
Will generate the following error:
Should the default tag property be changed, or can we get an additional option to change ?
Currently, using
preserveChildrenOrder = true
will make every node have a#name
property containing their tag name.With the latest iteration of JavaScript, variable names starting with an
#
will now be considered private properties by default.This makes creating TypeScript interfaces with this property impossible and may also be a breaking change in next-gen browsers supporting the private field feature.
Example TypeScript code:
Will generate the following error:
Should the default tag property be changed, or can we get an additional option to change ?
Thank you for your help
EDIT
Deconstruction also becomes tedious:
const { children, #name } = node;