lzztt / koa-session-minimal

Minimal implementation of session middleware for Koa 2
MIT License
75 stars 13 forks source link

Typescript typings #2

Closed arcanewater closed 7 years ago

arcanewater commented 7 years ago

Hey thanks for lib as koa-generic is a bit outdated, btw using this with Postgres is same with this lib + koa-pg-session? Or anything else recommended?

Also main question any possibilites for typescript 2 typings? Would be really awesome to use this with typescript

lzztt commented 7 years ago

Hi arcanewater,

Thanks for the suggestion. I haven't gotten any experience to create type definitions for TypeScript yet. I just googled "Koa TypeScript" to find an example. It seems like Koa 2 doesn't have TypeScript definitions either.

koa-pg-session should work well with this middleware. You can actually use any store that works with koa-generic. Because this middleware and koa-generic share the same store interfaces. I use 'koa-redis' for my personal projects.

arcanewater commented 7 years ago

Thanks for answer, actually Koa have definitions https://github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/koa here is browser for typings http://microsoft.github.io/TypeSearch/

lzztt commented 7 years ago

Thanks arcanewater, Very useful information. I should be able to create the definitions this week.

lzztt commented 7 years ago

@arcanewater pull request created: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/12029 the definition files are also available in my fork: https://github.com/longztian/DefinitelyTyped/tree/master/koa-session-minimal

lzztt commented 7 years ago

definitions merged to main repo https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/koa-session-minimal