Closed ydarma closed 3 years ago
Hi,
This workaround works :
import gateway from "fast-gateway";
import restana from "restana";
const service = restana();
const server = gateway({
server: Object.assign(service.getServer(), service),
routes: []
});
Hi @ydarma, thanks for reporting this issue. This is now fixed in v2.5.2
interface Options<P extends restana.Protocol> {
server?: Object | restana.Service<P> | Express.Application;
...
}
Many thanks!
Hi,
thank you for your work.
Describe the bug Cannot pass a restana
Service
object to the gateway in Typescript.To Reproduce
gives :
Expected behavior It should compile.
Solution in
index.d.ts
change line 50 :to
This is coherent with line 18 of
index.js
:and it works properly (for me).