puppeteer/website/versioned_docs/version-19.4.1/api/puppeteer.nodefor.md
2022-12-16 14:21:28 +01:00

448 B

sidebar_label
NodeFor

NodeFor type

Signature:

export declare type NodeFor<ComplexSelector extends string> =
  TypeSelectorOfComplexSelector<ComplexSelector> extends infer TypeSelector
    ? TypeSelector extends keyof HTMLElementTagNameMap
      ? HTMLElementTagNameMap[TypeSelector]
      : TypeSelector extends keyof SVGElementTagNameMap
      ? SVGElementTagNameMap[TypeSelector]
      : Element
    : never;