Skip to content

Conversation

@Flarna
Copy link
Contributor

@Flarna Flarna commented Jan 3, 2018

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).
  • Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/restify/node-restify/blob/master/lib/response.js
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

Got following error in #22171. Took a look into source code and it seems the headers: any property is wrong and therefore I removed it.

Error in restify
Command failed: node /home/travis/build/DefinitelyTyped/DefinitelyTyped/node_modules/dtslint/bin/index.js --onlyTestTsNext
Error: /home/travis/build/DefinitelyTyped/DefinitelyTyped/types/restify/index.d.ts
ERROR: 735:5  expect  TypeScript@next compile error: 
Subsequent property declarations must have the same type.  Property 'headers' must be of type '() => any', but here has type 'any'.

@blittle, @stevehipwell

@mhegazy
Copy link
Contributor

mhegazy commented Jan 3, 2018

Took a look into source code and it seems the headers: any property is wrong and therefore I removed it.

why? i do not see it used as a function anywhere in https://github.com/restify/node-restify/blob/master/lib/response.js. what am i missing?

@Flarna
Copy link
Contributor Author

Flarna commented Jan 3, 2018

@mhegazy Sorry, copied wrong link which points to master (v6) but typings here reflect restify 5. Correct link: https://github.com/restify/node-restify/blob/5.x/lib/response.js#L125

I haven't added the function, just removed the additional property.

@mhegazy mhegazy merged commit d858e8e into DefinitelyTyped:master Jan 3, 2018
@Flarna Flarna deleted the restify_fix-build branch January 3, 2018 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants