Commit Graph

485 Commits

Author SHA1 Message Date
zjiekai
9f1c7c6a92 setEncoding(encoding: string | null) (#11635)
Encoding can be disabled by calling readable.setEncoding(null).
https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding

Typescript v2.* has strictNullChecks which prevents passing null to setEncoding

https://www.typescriptlang.org/docs/release-notes/typescript-2.0.html
2016-10-03 21:25:42 +09:00
Andy Hanson
04b4272974 Merge remote-tracking branch 'origin/master' into merge_23sep 2016-09-23 07:24:23 -07:00
Jonny Stoten
132ad0d959 Add timingSafeEqual typings (#11426) 2016-09-23 21:46:26 +09:00
Andy
66484e9f11 Merge pull request #11383 from Flarna/node_httpversions
Correct types of httpVersionMinor and httpVersionMinor
2016-09-21 12:21:28 -07:00
TonyYang
c61446be23 Cancel type annotation on function 2016-09-22 02:45:06 +08:00
Gerhard Stöbich
0230e245a8 Correct types of http version
Correct type of httpVersionMajor and httpVersionMinor in IncomingMessage from string to number.
2016-09-21 20:42:32 +02:00
TonyYang
2698325c4b It should use boolean, not Boolean 2016-09-22 02:09:16 +08:00
TonyYang
df76aa9c43 It should use boolean, not Boolean 2016-09-22 02:08:52 +08:00
TonyYang
f4bea67bce Add return-type for emit 2016-09-22 01:51:58 +08:00
Andy Hanson
91d1d6d60f Merge remote-tracking branch 'origin/master' into merge_21sep 2016-09-21 09:45:05 -07:00
TonyYang
2502bbdc11 Correct type for net.Socket and net.Server events 2016-09-22 00:37:30 +08:00
TonyYang
3f858dadfb Correct test for net.Socket and net.Server events 2016-09-22 00:37:10 +08:00
Andy Hanson
79302123ac Merge commit 'origin/master~75' into merge_21sep 2016-09-21 08:41:31 -07:00
Andy Hanson
b02b9903cc Merge commit 'origin/master~100' into merge_21sep 2016-09-21 08:13:15 -07:00
TonyYang
9b72a0efa7 Add test for net.Server events 2016-09-21 17:41:16 +08:00
TonyYang
b7c965e817 Add test for net.Socket events 2016-09-21 17:30:04 +08:00
TonyYang
47929560ea Fix syntax 2016-09-21 17:20:12 +08:00
TonyYang
3dfb3e1353 Fix net events 2016-09-21 17:04:44 +08:00
Jay Anslow
ab8d917787 Node.JS EventEmitter accepts symbols as event names. 2016-09-20 10:30:02 +01:00
TonyYang
012b7f1072 [node] Format test definition (#11308)
* Format test definition in v4.x

* Format test definition in v6.x
2016-09-19 16:24:01 +09:00
TonyYang
28d9437778 Add events for fs (#11277) 2016-09-19 15:30:32 +09:00
TonyYang
48649b8718 [node] Add events and exitedAfterDisconnect in cluster.work (#11275)
* Add events for cluster.worker

* Add exitedAfterDisconnect for cluster.Worker
2016-09-19 15:29:20 +09:00
TonyYang
9d4d9924f1 [node] Clean up tls_tests and wrap in namespace (#11248)
* Clean up tls_tests and wrap in namespace for v6.x

* Clean up tls_tests and wrap in namespace for v4.x
2016-09-19 15:10:19 +09:00
TonyYang
4871fb2876 Add listening for http.Server (#11246) 2016-09-15 22:45:12 +09:00
TonyYang
48f9040fcc [node-tests.ts] Clean up crypto_tests and wrap in namespace (#11242)
* Clean up crypto_tests tests and wrap in namespace

* Clean up crypto_tests and wrap in namespace

* Use let to declares a block scope local variable

* Use let to declares a block scope local variable
2016-09-15 22:44:31 +09:00
TonyYang
62f98f1a3b [node-tests.ts] Clean up http_tests and net_tests (#11240)
* Clean up http_tests and net_tests

* Clean up fs tests and wrap in namespace
2016-09-15 22:43:21 +09:00
TonyYang
d685402549 [node-tests.ts] The test should test type, not function (#11238)
* The test should test type, not function

* The test should test type, not function
2016-09-15 22:42:34 +09:00
TonyYang
a72353df24 [node-tests.ts] A test should move to events_tests in node (#11237)
* A test should move to events_tests in node v6.x

* A test should move to events_tests in node v4.x
2016-09-15 22:42:17 +09:00
TonyYang
9d66141d07 [node.d.ts] Update cluster definition (#11235)
* Update cluster

* Add ;
2016-09-15 22:41:55 +09:00
paulmorphy
1a97636e03 Added definition for the missing dns.setServers(servers) method (#11183)
* Added definition for the missing dns.setServers(servers) method

Method is documented here:
https://nodejs.org/docs/latest/api/dns.html#dns_dns_setservers_servers

* Updated definition for dns.resolveMx

The addresses argument passed to the callback function will contain an array of objects
containing both a priority and exchange property:
https://nodejs.org/docs/latest/api/dns.html#dns_dns_resolvemx_hostname_callback
2016-09-15 22:20:21 +09:00
zhengbli
c2a54db3e9 Merge branch 'master' into types-2.0
# Conflicts:
#	amcharts/AmCharts.d.ts
#	angular-gettext/angular-gettext.d.ts
#	angular-jwt/angular-jwt.d.ts
#	angular-material/angular-material.d.ts
#	angularjs/angular.d.ts
#	auth0-js/auth0-js.d.ts
#	aws-lambda/aws-lambda.d.ts
#	aws-sdk/aws-sdk.d.ts
#	azure-mobile-apps/azure-mobile-apps.d.ts
#	azure-mobile-services-client/AzureMobileServicesClient.d.ts
#	blessed/blessed-tests.ts
#	blessed/blessed.d.ts
#	bootbox/bootbox.d.ts
#	bowser/bowser.d.ts
#	cache-manager/cache-manager.d.ts
#	chai-things/chai-things.d.ts
#	colors/colors.d.ts
#	cordova/cordova-tests.ts
#	cordova/plugins/Contacts.d.ts
#	cordova/plugins/FileSystem.d.ts
#	couchbase/couchbase.d.ts
#	cucumber/cucumber-tests.ts
#	cucumber/cucumber.d.ts
#	d3/d3.d.ts
#	dojo/dojo.d.ts
#	dustjs-linkedin/dustjs-linkedin.d.ts
#	esprima/esprima.d.ts
#	express-serve-static-core/express-serve-static-core.d.ts
#	express-session/express-session.d.ts
#	fetch-mock/fetch-mock.d.ts
#	fs-extra/fs-extra.d.ts
#	fullCalendar/fullCalendar.d.ts
#	github-electron/github-electron.d.ts
#	gulp-uglify/gulp-uglify.d.ts
#	gulp/gulp.d.ts
#	highcharts/highcharts.d.ts
#	imap/imap.d.ts
#	incremental-dom/incremental-dom.d.ts
#	inversify/inversify.d.ts
#	ionic/ionic.d.ts
#	ioredis/ioredis.d.ts
#	isomorphic-fetch/isomorphic-fetch-tests.ts
#	jake/jake.d.ts
#	joi/joi.d.ts
#	jquery-mockjax/jquery-mockjax.d.ts
#	jquery/jquery.d.ts
#	js-data-http/js-data-http-tests.ts
#	js-data-http/js-data-http.d.ts
#	js-data/js-data.d.ts
#	jsdom/jsdom.d.ts
#	jsts/jsts-tests.ts
#	knex/knex.d.ts
#	koa-favicon/koa-favicon.d.ts
#	koa-router/koa-router-tests.ts
#	koa-router/koa-router.d.ts
#	lodash/lodash.d.ts
#	mailparser/mailparser.d.ts
#	maquette/maquette.d.ts
#	material-ui/material-ui.d.ts
#	matter-js/matter-js.d.ts
#	moment/moment.d.ts
#	mongoose-promise/mongoose-promise-tests.ts
#	mongoose/mongoose-tests.ts
#	mongoose/mongoose.d.ts
#	multer/multer.d.ts
#	ncp/ncp.d.ts
#	nock/nock.d.ts
#	node/node-tests.ts
#	node/node.d.ts
#	nvd3/nvd3.d.ts
#	object-assign/object-assign.d.ts
#	openlayers/openlayers.d.ts
#	parse/parse.d.ts
#	pdf/pdf.d.ts
#	pdfkit/pdfkit.d.ts
#	pg/pg.d.ts
#	pixi.js/pixi.js.d.ts
#	progress/progress.d.ts
#	pusher-js/pusher-js.d.ts
#	quill/quill-tests.ts
#	quill/quill.d.ts
#	radium/radium.d.ts
#	ravenjs/ravenjs-tests.ts
#	react-dropzone/react-dropzone.d.ts
#	react-mdl/react-mdl.d.ts
#	react-native/react-native.d.ts
#	react-notification-system/react-notification-system.d.ts
#	react-router/history-tests.ts
#	react-router/react-router-tests.tsx
#	react-router/react-router.d.ts
#	react-select/react-select-tests.tsx
#	react-select/react-select.d.ts
#	react/react.d.ts
#	redux-form/redux-form.d.ts
#	request-promise/request-promise.d.ts
#	resolve-from/resolve-from.d.ts
#	riot-api-nodejs/riot-api-nodejs.d.ts
#	sanitize-html/sanitize-html.d.ts
#	segment-analytics/segment-analytics.d.ts
#	simple-assign/simple-assign-tests.ts
#	simple-assign/simple-assign.d.ts
#	slate-irc/slate-irc.d.ts
#	soap/soap.d.ts
#	socket.io/socket.io.d.ts
#	sql.js/sql.js-tests.ts
#	sql.js/sql.js.d.ts
#	steam/steam.d.ts
#	stylus/stylus.d.ts
#	swiper/swiper.d.ts
#	tedious/tedious.d.ts
#	threejs/three.d.ts
#	twilio/twilio.d.ts
#	underscore/underscore.d.ts
#	ws/ws.d.ts
#	yeoman-generator/yeoman-generator.d.ts
2016-09-14 18:44:24 -07:00
TonyYang
3423aa94ff connection are socket are same in IncomingMessage (#11219) 2016-09-14 22:17:36 +09:00
TonyYang
8193bc8f6e [node.d.ts] Add definite events for Readable and Writable (#11217)
* Add definite events for Readable and Writable

* Delete comments in cluster

* Recovery cluster

* Remove interface extends events.EventEmitter
2016-09-14 22:13:43 +09:00
hriss95
5ee054ac95 [Node.d.ts]: Update definitions for module "crypto" (#11186) 2016-09-14 21:26:40 +09:00
TonyYang
684fa0d894 [node.d.ts] Correct NodeBuffer.toJSON type (#11177)
* Correct NodeBuffer.toJSON type

* Correct NodeBuffer.toJSON type in Node v4.x
2016-09-14 21:21:03 +09:00
TonyYang
d1171f6895 [node.d.ts] Implement function tests for assert (#11175)
* Implement function tests for assert

* Implement function tests for assert - Node v4.x
2016-09-14 21:20:31 +09:00
TonyYang
f7b0b1c8a0 Correct assert.fail parameters (#11176) 2016-09-14 21:20:09 +09:00
TonyYang
d9ed548add Delete deprecated functions (#11173) 2016-09-14 21:15:15 +09:00
Sheetal Nandi
0c5c7a2d2b Merge pull request #11093 from TonyPythoneer/patch-9
[node] Clean up testcase of assert
2016-09-09 16:00:37 -07:00
Sheetal Nandi
1109afea97 Merge pull request #11131 from TonyPythoneer/patch-17
[node] Clean up url tests and wrap in namespace
2016-09-09 12:39:40 -07:00
Zhengbo Li
4008a51db4 Merge pull request #11084 from plantain-00/node-crypto-2
fix types of node crypto module
2016-09-09 10:40:46 -07:00
hriss95
ab57464fa2 Node.d.ts: Update definitions for module "stream" (#11086)
* Node.d.ts: Update definitions for module "stream"

* Node.d.ts: Fix an issue that caused tests to fail
2016-09-10 00:35:38 +09:00
TonyYang
aee853cc82 [node]Rearrange the order and add missing stuff for os (#11146)
* Rearrange the order and add missing something

* Correct type of constants
2016-09-10 00:35:23 +09:00
TonyYang
ab4e532fa2 Add new stuff (#11147)
* Add new stuff

* Correct indent style and variable type
2016-09-09 23:57:01 +09:00
TonyYang
1d50912b2b [node] Correct constants module for node v6 (#11140)
* Correct constants module

* Add tests for constants

* Typo namespace

* Recovery constants module and add two stuffs
2016-09-09 23:52:36 +09:00
hriss95
c49a53466c Node.d.ts: Update definitions for module "dgram" (#11143) 2016-09-09 23:45:18 +09:00
TonyYang
fc1b3e11df [node] imported and global process are same (#11092)
* imported and global process are same

* imported and global process are same
2016-09-09 23:33:18 +09:00
hriss95
255697da9f Node.d.ts: Update definitions for module "tls" (#11025)
* Node.d.ts: Update definitions for module "tls"

* Node.d.ts: Update definitions for module "tls"

* Node.d.ts: Revert function connect changes

* Node: Update definitions and tests for module "tls"

* Node: Fix a typo in definitions for module "tls"
2016-09-09 22:48:55 +09:00
hriss95
c5e23ee8da Node.d.ts: Add module v8 (#10932)
* Node.d.ts: Add module v8

* Node.d.ts: Changes to module "v8"
2016-09-09 22:41:06 +09:00
TonyYang
1845c1fba0 Clean up url tests and wrap in namespace 2016-09-09 10:59:14 +08:00