Closed otaviotech closed 6 years ago
Hi, thanks for the addition. Does this change cause any issues for non-type-script projects?
Also, is there a way to inherit from the Restify Server type for the Router type? The intention of the router is to have the same interface as the server (plus the applyRoutes)
Hi, thanks for replying!
Hi, thanks for the addition. Does this change cause any issues for non-type-script projects?
No, it only affects TypeScript projects by adding code completion and importing, which now can be made with:
import { Router as RestifyRouter } from 'restify-router'
Also, is there a way to inherit from the restify Server type for the Router type? The intention of the router is to have the same interface as the server (plus the applyRoutes)
I don't think so... What I found is that the restify Server class inherits from nodes http.Server and it has more methods, which are not implemented by restify-router, so I don't know if it would be possible.
Did I answered your questions correctly? Thank you!
sounds good. i'll create a release soon.
It allows us to use RestifyRouter in TypeScript powered projects without need to make some known tricks like:
declare var
.