Skip to content

Module "preact/compat" has no exported member ElementRef #4481

@PratikDev

Description

@PratikDev
  • Check if updating to the latest Preact version resolves the issue

Describe the bug
The ElementRef type is not available yet

To Reproduce
Check this Stackblitz demo where i'm importing the ElementRef from preact. In the same line render is also imported. If you hover over render you'll see the type definition of it. But that's not the case for ElementRef. It doesn't show any type definition (idk why Stackblitz isn't showing any error there. but vscode does)

Steps to reproduce the behavior:

  1. Run npm init preact elementRefDemo
  2. Check Typescript when asked
  3. Try importing ElementRef in src/index.ts from preact or preact/compact

Expected behavior
ElementRef should be available in preact or preact/compact

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions