Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.37 KB

Typescript.md

File metadata and controls

33 lines (21 loc) · 1.37 KB

🏠 Home

Dynadux - Typescript

Not so much to say about Typescript and Dynadux. Dynadux is written in Typescript.

Simple Ctrl-Click the Type, and your smart IDE will navigate you into the types of Dynadux.

Here are some tips and techniques.

Get interface of createAppStore

The technique of the createAppStore that exports the API for the app is great because we don't have to declare the return interface for it.

But down the road, you might need that interface.

To get the interface of it we will use some Typescript magic:

interface IAppStoreApi extends ReturnType<typeof createAppStore> {}

Now you can pass this type to nested Components or Providers.

Read more