Skip to content

[restify] Fix build by removing wrong headers property from Response#22653

Merged
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
Flarna:restify_fix-build
Jan 3, 2018
Merged

[restify] Fix build by removing wrong headers property from Response#22653
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
Flarna:restify_fix-build

Conversation

@Flarna
Copy link
Copy Markdown
Contributor

@Flarna Flarna commented Jan 3, 2018

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
Copy Markdown
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
Copy Markdown
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