Closed xatian closed 1 year ago
I think the typescript-declarations in a few places could be improved.
Node currently it is like this:
export default class TextNode extends Node { constructor(rawText: string, parentNode: HTMLElement, range?: [number, number]); }
seeing in the JS-code that the parentNode is not required it should be like this:
export default class TextNode extends Node { constructor(rawText: string, parentNode?: HTMLElement, range?: [number, number]); }
same issue in the constructor of CommentNode.
HTMLElement currently it is like this:
export default class HTMLElement extends Node { constructor(tagName: string, keyAttrs: KeyAttributes, rawAttrs: string, parentNode: HTMLElement | null, range: [number, number], voidTag?: VoidTag, _parseOptions?: Partial<Options>); }
seeing in the JS-code that only tagName and keyAttrs are required it should be:
export default class HTMLElement extends Node { constructor(tagName: string, keyAttrs: KeyAttributes, rawAttrs?: string, parentNode?: HTMLElement, range?: [number, number], voidTag?: VoidTag, _parseOptions?: Partial<Options>); }
Thank you!
Thank you.
I think the typescript-declarations in a few places could be improved.
Node currently it is like this:
seeing in the JS-code that the parentNode is not required it should be like this:
same issue in the constructor of CommentNode.
HTMLElement currently it is like this:
seeing in the JS-code that only tagName and keyAttrs are required it should be:
Thank you!