mobx-preact icon indicating copy to clipboard operation
mobx-preact copied to clipboard

Typescript typings

Open John0x opened this issue 6 years ago • 2 comments

Why have the Typescript bindings been omitted from the project as the README says?

Does it still include the typings?

John0x avatar Jan 10 '18 15:01 John0x

It's not something I have had time to work on or test sufficiently yet. PRs welcome!

philmander avatar Jan 10 '18 15:01 philmander

Here's my mobx-preact.d.ts which I include in every project

declare module "mobx-preact" {
  import { ComponentConstructor } from "preact"
  type Component<P = any> = ComponentConstructor<P>
  export function observer<T extends Component>(target: T): T
}

phaux avatar Apr 07 '19 03:04 phaux