Commit Graph
225 Commits
Author SHA1 Message Date
Oliver Joseph Ash 63cf621848 Merge branch 'master' into patch-14 2017-12-05 12:12:23 +00:00
Hannes Magnusson a385b18cd6 Export nodejs native tls.checkServerIdentity function 2017-12-04 12:18:51 -08:00
Hannes Magnusson d251c643c3 Fix lint error: 'tslint:disable' is forbidden 2017-12-04 07:38:30 -08:00
Piotr Roszatycki e36486c4e8 padLeft/padRight are defined in es2017.string lib already 2017-11-21 11:23:55 +01:00
Piotr Roszatycki ff4b1f0af7 String object has additional ES2017 and ESNEXT methods 2017-11-17 13:51:19 +01:00
Sebastian Silbermann df70a8d72c node: add documented highWaterMark option 2017-11-15 17:59:59 +01:00
Nathan Shively-SandersandGitHub 15033df87a Merge pull request #21256 from jez9999/patch-4
Add various effective UID and groups operations
2017-11-14 09:25:34 -08:00
Kevin Greene c4d7629e1b Merge remote-tracking branch 'upstream/master' into node-client 2017-11-13 16:06:34 -08:00
Oliver Joseph AshandAndy a8e88654be Node: path.format input properties are optional (#21003)
* Node: `path.format` input properties are optional

If `base` does not exist, `name` and `ext` will be used to compute it.

http://devdocs.io/node/path#path_path_format_pathobject

* Node: `FormatInputPathObject`: all properties are optional

* Node: add myself as author

* Avoid usage of `Partial`
2017-11-10 07:37:12 -08:00
Kelvin JinandAndy f5c7db2f30 [node] bump inspector types for V8 6.1 (#21012) 2017-11-07 09:23:37 -08:00
AndyandGitHub 9413f9cb41 node types don't really require TypeScript@2.2 (#21283) 2017-11-06 11:28:30 -08:00
Teppei SatoandAndy a68863ebbd node: improve util.promisify (#21253) 2017-11-06 07:03:48 -08:00
Andrew StuckiandAndy ce7836d4ac Add windowsVerbatimArguments for node child_process (#20694) 2017-11-06 07:00:45 -08:00
Jeremy MortonandGitHub 28f78b8c2a Use unions instead of overloads 2017-11-05 18:00:00 +00:00
Jeremy MortonandGitHub ffbf3b101a Fix array type notation 2017-11-05 17:07:25 +00:00
Jeremy MortonandJeremy Morton e0da5d33e6 Add various effective UID and groups operations 2017-11-05 15:29:38 +00:00
Kevin Greene d17893c89b Add specific properties to iIncomingHttpHeaders 2017-10-27 12:30:59 -07:00
Kevin GreeneandGitHub 293dc4c62a Merge branch 'master' into node-client 2017-10-27 10:28:29 -07:00
Kevin Greene 6d2a1ad814 [node] Fix linting errors in node v8 2017-10-27 10:09:18 -07:00
Kevin Greene d1fe542d52 Account for 'set-cookie' header in Node v8 types 2017-10-27 10:05:05 -07:00
Kevin Greene df9c373de2 Make HttpHeader types more specific 2017-10-26 22:30:34 -07:00
Oliver Joseph Ash 95f225e44a Document types 2017-10-25 17:47:06 +01:00
Oliver Joseph Ash d12e7c1f38 Specify wider query for UrlObject 2017-10-25 17:46:33 +01:00
Oliver Joseph Ash c2b55c10e7 Create UrlObjectCommon and move wider port type to UrlObject 2017-10-25 17:46:15 +01:00
Kevin Greene 06a8ff4a13 Add tests for RequestOptions and ClientRequestArgs 2017-10-24 11:14:44 -07:00
Kevin Greene 3a86a2b2c5 [node] Fix linting errors 2017-10-24 09:02:06 -07:00
AndyandGitHub 165e2bf7b0 Fix no-redundant-jsdoc ignores -- include no-redundant-jsdoc-2 (#20954) 2017-10-24 08:53:43 -07:00
Kevin Greene 63e6236af8 Fix to just make ClientRequestArgs an alias of RequestOptions 2017-10-23 15:32:52 -07:00
Jinwoo LeeandSheetal Nandi b15672e837 Node http2: Fix types of statCheck() and getTrailers() (#20729)
The `headers` parameter of statCheck() and the `trailers` parameter of
getTrailers() must be OutgoingHttpHeaders, not IncomingHttpHeaders, because they
are to be updated by statCheck()/getTrailers() before being sent to the opposite
endpoint.
2017-10-23 14:58:48 -07:00
FlarnaandSheetal Nandi eba2b89b3c [node] Some fixes for net and https (#20662)
Sync Lookup function type in net, tls and dgram.
2017-10-23 13:17:14 -07:00
AndyandGitHub a2c81182cf node: Fix lint (#20835) 2017-10-23 07:34:15 -07:00
Oliver Joseph Ash 9038ae1fe3 Revert "Node: rename URL types for clarity"
This reverts commit 0e652b0a41.
2017-10-19 18:57:56 +01:00
Jinwoo LeeandAndy e86a56d0cc Node http2: statCheck() may also return false. (#20692)
* Node http2: statCheck() may also return `false`.

https://nodejs.org/dist/latest-v8.x/docs/api/http2.html#http2_http2stream_respondwithfile_path_headers_options
says:
The options.statCheck function may also be used to cancel the send operation by
returning false

Related node code:
  - https://github.com/nodejs/node/blob/master/lib/internal/http2/core.js#L1621
  - https://github.com/nodejs/node/blob/master/lib/internal/http2/core.js#L1671

* add tests for returning false from statCheck()

* change `void|false` to `void|boolean`

* fix lint error
2017-10-19 10:22:12 -07:00
Oliver Joseph Ash 901b2ad518 Node: add and share ParsedUrlQuery type 2017-10-19 12:55:39 +01:00
Oliver Joseph Ash 0e652b0a41 Node: rename URL types for clarity 2017-10-19 12:49:23 +01:00
Oliver Joseph Ash 8ff1f29a5b Node: remove redundant widen of query type to any 2017-10-19 12:49:08 +01:00
Roberto DesideriandAndy 2fd1709e59 Remove myself from the authors (#20697) 2017-10-18 13:44:29 -07:00
Kevin Greene bf50c9a7a7 [node] Update older node types (7,6,4) for more consistency with 8
* Specifically add interfaces for reqeust headers
  * Make the naming of client request options consistent (ClientRequestArgs)
2017-10-18 12:49:44 -07:00
Oliver Joseph AshandAndy 0960f82a0b Correct type of Node url.query (#20650)
* Correct type of Node url.query

https://nodejs.org/api/url.html#url_urlobject_query

* Add null

* Node url.query: query value as array of strings

* Node: narrow query type to fix tests
2017-10-18 08:56:47 -07:00
Jinwoo LeeandAndy 63605aa515 Node: respondWithFile()'s options can have onError. (#20659)
* respondWithFile()'s `options` can have onError.

See the Node document:
https://nodejs.org/dist/latest-v8.x/docs/api/http2.html#http2_http2stream_respondwithfile_path_headers_options

And also the code:
https://github.com/nodejs/node/blob/master/lib/internal/http2/core.js#L1698

* update test
2017-10-18 08:54:49 -07:00
Oliver Joseph AshandAndy 2be8cb24b6 Correct return type of Node querystring.parse (#20651)
* Correct return type of Node querystring.parse

https://nodejs.org/api/querystring.html#querystring_querystring_parse_str_sep_eq_options

* request-promise-native: require TS 2.2 to fix error from Node typings

* Node querystring.parse: return type: query value as array of strings

* Fix tests for request, request-promise, request-promise-native
2017-10-18 08:51:36 -07:00
Jeff KenneyandAndy 43a2660602 Fix node url and http/https request types (#18766)
* [node] url.format can take a string

* [node] http.request / https.request can take a string

* [node] reorder Url properties to match ordering in docs

* [node] DRY out the Url and UrlObject types

* [node] backport split Url / UrlObject types to v0 and v4

* remove 'any' union for UrlObject.query type
2017-10-17 12:00:46 -07:00
Alessandro VerganiandAndy d518490227 Add O_DSYNC flag (#20638) 2017-10-17 09:17:47 -07:00
Alessandro VerganiandAndy 52f686b9db Add lookup to dgram SocketOptions (#20636) 2017-10-17 09:16:06 -07:00
Jinwoo LeeandAndy fb93c75e47 Fix type of createPushResponse() in node http2. (#20510)
* Fix type of createPushResponse() in node http2.

From https://github.com/nodejs/node/blob/master/lib/internal/http2/compat.js#L628:
`callback` is required to be a function. And its second argument is an `Http2ServerResponse`.

* `err` is nullable.

* delete redundant tests that have partial arguments
2017-10-17 08:35:55 -07:00
Alessandro VerganiandAndy 0905b3d2f9 Add copyFile to node file system (#20185) 2017-10-17 08:00:05 -07:00
Piotr RoszatyckiandAndy 8ef0c39ccf node: process.stdin is a stream.Readable and process.stdout is a stream.Writable (#20493)
* Readable.wrap returns this

* Add missing properties to interface ReadableStream and WritableStream; change interfaces in fs, dgram and net into classes

* Move all additional properties from ReadableStream interface to ReadStream interface (and Write...)

* hexo-fs should re-export classes from 'fs'

* process.stdin._destroy is a function
2017-10-17 07:44:21 -07:00
Jarrad WhitakerandAndy d7f5d8fa90 @types/node: Asynchooks promiseResolve and AsyncResource (#20540)
* add promiseResolve hook

* add AsyncResource

* AsyncResource jsdoc fixes

* test remaining AsyncResource methods
2017-10-16 13:42:29 -07:00
Piotr RoszatyckiandAndy 173d1d4e9e node: dgram buffer size options and methods for Node 8.7.0 (#20535)
* dgram buffer size options and methods

* Verify type returned by dgram.*BufferSize methods
2017-10-16 13:40:56 -07:00
Jinwoo LeeandAndy 99064aa7c7 Add types for Writable#_writev() & Duplex#_writev(). (#20529)
* Add types for Writable#_writev() & Duplex#_writev().

As written in the doc:
https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_writable_writev_chunks_callback

* change `callback` from `Function` to `(err?: Error) => void`

* make _writev() optional.

Per the node document, it may or may not be implemented by implementations.
2017-10-16 13:39:23 -07:00