Skip to content

inline plugin types for JSX #619

@oscarotero

Description

@oscarotero

Version

any

Platform

any

What steps will reproduce the bug?

enable jsx_preact and inline.
The preact types doesn't include the inline attribute types so it shows a warning in vscode.

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

do not fail

What do you see instead?

imaxe

Additional information

A solution:

// types.d.ts
declare global {
  namespace preact.JSX {
    interface HTMLAttributes {
      inline?: boolean | undefined;
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions