Typescript definitions for shopify koa packages

Solved
Highlighted
Excursionist
17 0 4

I'd like to start using Typescript on my node.js backend, but when I get started changing server.js to a server.ts, it needs type definitions for things like the ctx object returned by createShopifyAuth.

 

Are there typescript definitions for the koa packages I can use, or is my only choice writing the definitions myself? 

 

thanks in advance,

Randy

1 Like
Highlighted
New Member
2 1 1

This is an accepted solution.

Hey Randy,

If you have a look here: https://github.com/Shopify/quilt/blob/master/packages/koa-shopify-auth/src/types.ts hopefully you can find what you're after as far as ctx goes (ctx: Context).

Hope this helps! 

Andrew 

1 Like
Highlighted
Excursionist
17 0 4

Thanks Andy!

0 Likes