node.js - Incorrect TypeScript definition for request / request-promise: option "time" is missing -
on nodejs typescript , using npm request-promise (which wraps npm request).
i want use "time" option time round-trip documented here "time - if true, request-response cycle (including redirects) timed @ millisecond resolution, , result provided on response's elapsedtime property" , available within npm evidenced here
if (options.time) { self.timing = true self.elapsedtime = self.elapsedtime || 0 }
but option doesn't appear supported in of request definitions can find.
so first question - reading things wrong?
if not, second question - there reason it's not there?
finally, if should there - can modify local copy of definitions but, of course, better way repository definitions fixed , i'm not sure best way go doing that, can point me in right direction?
the definition time option missing typings definition of request package: https://github.com/louy/typed-request/blob/master/index.d.ts
the typings definition version 2.69 of request package (https://github.com/typings/registry/blob/master/npm/request.json) didn't have time option
to repository definition fixed, can ask author of type-request repository fix it, or can fork main repository, updates , issue pull request original author. in mean time, can still install definitions updated project with:
typings install --save github:<yourgithubusername>/<repositoryname>#<commitsha>