Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Provide TypeScript types to the project #77

Open
bryantee opened this issue Feb 28, 2019 · 4 comments
Open

Provide TypeScript types to the project #77

bryantee opened this issue Feb 28, 2019 · 4 comments

Comments

@bryantee
Copy link

Would be great if we got some static type checking out of the box. Granted this isn't a massive library, but anything helps. I can try and tackle this if it is of any value.

Somewhat related to #6 for adding Flow support.

@jordanbyron
Copy link
Owner

@bryantee I don't have a lot of exposure to typescript so I won't be much help in rolling it out. As long as whatever we do is backwards compatible I'm happy to review it. Thanks!

@JonnyBurger
Copy link

I installed the update with the TS definition file.

Two questions.. Is userInfo an optional property? Now I get a TS error because I did not specify userInfo property.
Also, must it be of the shape {url: string} or can it be an arbitrary object?

cc @kevinhermawan

@kevin-hyperjump
Copy link
Contributor

@JonnyBurger userInfo is required property and and the value can't an arbitrary object

@JonnyBurger
Copy link

@kevinhermawan Hmm, why does the comment say in the README

userInfo: {
   url: "app://orders" // Provide any custom data like deep linking URL
}

?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants