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

19 lines
448 B
Markdown

---
sidebar_label: NodeFor
---
# NodeFor type
#### Signature:
```typescript
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;
```