Restify 5.0.0 is finally released 馃帀 so TypeScript definitions needs to be updated accordingly.
As an example the CORS has been removed and moved here:
https://github.com/TabDigital/restify-cors-middleware
The changelog is available here:
https://github.com/restify/node-restify/blob/5.x/CHANGES.md#500
Contributors to notify: @blittle, @stevehipwell, @fortuna, @mhegazy, @andy-ms
Reference for the restify repo: https://github.com/restify/node-restify/issues/1389
@simonepri - I've started looking at making the changes for this but as there is currently no v5.0.0 documentation from the Restify team this might be quite painful. Do you have any specifics that are not working for you?
@stevehipwell currently I've not tested it at all, the issue was opened just as a reminder.
My plan is to move our project to typescript soon, I will let you now asap.
I'll try to help, as soon as I get it.
There is a migration guide available here:
https://github.com/restify/node-restify/blob/5.x/4TO5GUIDE.md
I have only a very simply restify project but so far I have no issues other than remembering to install @types/restify-errors since the HTTP Errors have been separated into a separate project.
Also restify.queryParser() etc now seem to be restify.plugins.queryParser()
The CORS plugin has been removed entirely and replaced with a recommendation to use:
https://github.com/TabDigital/restify-cors-middleware
This doesn't currently have TypeScript definitions.
I've attempted my first OSS contribution for the CORS middleware here https://github.com/DefinitelyTyped/DefinitelyTyped/pull/17747
I've created a pull request.
Created another PR with some more changes.
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/18036
@types/restify 5.0.1 is missing Server.router.
@mattbishop can you add a link to the documentation for Server.router?
http://restify.com/node-restify/ has a section called "Hypermedia" and on it they refer to server.router in their example.
@mattbishop - Sorry for the delay. I've added the following properties to the definition for the Restify Server interface:
serverrouterI've created a pull request for this.
Thanks @simonepri
Most helpful comment
I've attempted my first OSS contribution for the CORS middleware here https://github.com/DefinitelyTyped/DefinitelyTyped/pull/17747