Commit Graph

51 Commits

Author SHA1 Message Date
Basarat Ali Syed
d7968354c2 Merge pull request #1327 from ctaggart/nodejsBugStream
node bug fix, make ReadableStream the same as stream.ReadableStream
2013-11-24 14:24:04 -08:00
Cameron Taggart
ee21e8494b makes ReadableStream the same as stream.ReadableStream by applying the pipe change
from commit d0139df89d
2013-11-24 15:36:02 -06:00
Paul Loyd
70a2f13438 Fix assert module 2013-11-24 18:00:30 +04:00
Paul Loyd
f2a4348c20 Correct domain module 2013-11-24 17:38:56 +04:00
Paul Loyd
c3541fe0b9 Correct assert module 2013-11-24 17:38:56 +04:00
Chris Cowan
5b9620556e Fixes for node definitions.
setTimeout, setInterval, setImmediate are fixed to accept more
arguments.

setTimeout, setInterval, clearTimeout, clearInterval are changed to
return and accept objects of the new Timer interface, which exposes the
ref() and unref() methods.

fs.readFileSync is changed so that it returns a string if it is passed
an options parameter with an "encoding" property, and returns a
NodeBuffer otherwise.

fs.watchFile and fs.unwatchFile listener parameters are fixed. listener
is a callback with two parameters, not an object with two properties.

fs.watch is fixed so a listener parameter can be given without an
options parameter.

crypto.randomBytes is fixed so that it can be called synchronously,
returning a NodeBuffer.

crypto.pseudoRandomBytes is added.
2013-11-23 16:31:40 -06:00
Paul Loyd
5ddb5b9c3e Correct cluster and add events.EventEmitter.listenerCount 2013-11-20 18:12:31 +03:00
Paul Loyd
1b027b44e1 Update node.d.ts
Update signature of EventEmitter#emit
2013-11-15 20:57:49 +03:00
John Vilk
b6f524aa2f Buffer.copy() returns the number of bytes copied.
I know it's not mentioned in the documentation, but the Node unit tests check for this behavior, e.g. https://github.com/joyent/node/blob/master/test/simple/test-buffer.js#L54
2013-11-03 04:17:31 -05:00
Duncan Mak
d9735793e9 Update signatures for EventEmitter.
Allow for method chaining in addListener/removeListener, on/once,
and removeAllListeners.

Fix return type for 'emit'.

This patch mirrors the changes made to the API docs in this commit:
41cbdc5e64
2013-10-22 11:22:35 -04:00
John Vilk
baa367d1b3 stat/lstat/fstat are asynchronous and return void.
Also tidying up a few callback signatures for fun.
2013-09-28 17:48:26 -04:00
John Vilk
0b306aaef6 'mode' can be a number or a string.
I realize this could be considered pedantic, but the typings do not even consistently use one or the other. Previously, certain functions assumed string, others assumed number. This way, you can use either.
2013-09-27 15:50:03 -04:00
John Vilk
666cd33fe8 In many fs functions, mode is optional, which means that the argument that takes its slot becomes the callback.
Adding alternative definitions to account for this.
2013-09-27 15:43:28 -04:00
John Vilk
d39e7a3125 In fs's truncate functions, 'len' is optional (and defaults to 0). 2013-09-27 15:20:58 -04:00
John Vilk
b6874ee014 fs.realpath's cache is an *object literal*, not a string or a boolean. 2013-09-27 15:00:04 -04:00
John Vilk
e442870348 Whoops. fd is a *string*, not a *number*. 2013-09-27 14:51:25 -04:00
John Vilk
aed3e0fc50 Adding missing method signatures and fixing incorrect method signatures.
The following missing methods were added:
* fs.readlinkSync
* fs.ftruncate
* fs.ftruncateSync

The following method signatures were fixed:
* path.resolve: Takes an array of arbitrary length. This does not necessarily need to be a string array; resolve skips any non-string elements.
* process.cwd: Returns a string, not void.
2013-09-27 14:46:39 -04:00
basarat
d0139df89d node : readable stream pipe can be piped further closes #1030 2013-09-10 19:32:21 +10:00
damianog
1c1e096228 options is optional
http://nodejs.org/api/zlib.html#zlib_options
2013-09-09 19:57:57 +02:00
damianog
7b74efd634 ServerRequest headers is an object
http://nodejs.org/api/http.html#http_message_headers
2013-09-07 20:31:45 +02:00
Chris Scribner
95b783e972 Update node type definitions to compile under -noImplicitAny 2013-09-04 18:11:20 -04:00
anti.veeranna
c1d25c84f1 describe stream.Readable class 2013-09-04 06:17:10 -04:00
damianog
0ad9432d61 Node.js util.inspect must return a string
As explained here:

http://nodejs.org/api/util.html#util_util_inspect_object_options

util.inspect return a string
2013-08-29 21:16:11 +02:00
Diullei Gomes
7234449d22 Merge pull request #914 from cybrown/master
Extending EventEmitter interface on FSWatcher interface
2013-08-24 20:50:24 -07:00
Jed Hunsaker
8c6e74ce37 Untabify 2013-08-22 21:56:17 -07:00
Cy Brown
bd9fc8c260 Extending EventEmitter interface on FSWatcher interface 2013-08-22 22:47:06 +02:00
Hans Malherbe
59c20e38fd Add optional time argument for process.hrtime 2013-08-21 17:45:32 +02:00
Cary Haynie
1a95e29af3 update connect() calls to correctly return NodeSocket object. 2013-08-19 10:49:44 -04:00
Ty
c2a7c36945 Fixed type mistake 2013-08-17 15:22:54 -07:00
Panu Pitkämäki
dc5453adbd Fixed typo in listener removal method, now conforms to interface. 2013-08-07 18:00:11 +03:00
Panu Pitkämäki
bd6ddbdce2 Migrated a breaking change between Typescript 0.8 and 0.9: Syntax of external module imports now uses 'require'. 2013-08-07 15:49:36 +03:00
Boris Yankov
d1f801dd39 Fix node removeAllListeners method definition 2013-08-06 22:02:46 +03:00
basarat
79dc2f4c35 path.resolve
It can take a single "to" parameter : http://nodejs.org/docs/latest/api/path.html#path_path_resolve_from_to and in fact that is *the* way you get "Absolute paths" in node
2013-08-04 16:07:49 +10:00
Diullei Gomes
274667b760 bug fix - node test 2013-07-19 12:11:20 -03:00
NN
184bda7faf Update according to TS 0.9
'export = internal' is illegal.
2013-07-05 22:05:25 +03:00
Poul Sørensen
bb5d20d333 Update node.d.ts 2013-06-24 23:39:56 +02:00
Andrew Gaspar
3d190b9b50 Made assert module a fundule. 2013-06-19 23:06:03 -07:00
Andrew Gaspar
1aac9b3436 Updated node definition to make assert a fundule. 2013-06-19 23:03:20 -07:00
Niklas Mollenhauer
cc96a71a98 bool -> boolean 2013-06-19 01:47:21 +03:00
Niklas Mollenhauer
038becceff removed console type since it is included in the lib.d.ts standard definition file (TypeScript 0.9) 2013-06-19 00:45:24 +02:00
karlw4
63f3e198fe missing global functions setImmediate and clearImmediate,
see documentation at http://nodejs.org/api/timers.html
2013-06-15 14:51:05 +02:00
Bart van der Schoor
c084481b2e replaced tab withs spaces 2013-06-09 23:23:51 +03:00
Bartvds
0eb892ba53 added missing require.main 2013-06-09 22:20:11 +02:00
Bartvds
79d3a4e648 require.resolve - added id argument 2013-04-26 18:30:15 +02:00
AntonAM
fd01ace516 Added overloaded version of setgid and setuid.
Instead of making argument's type 'any' we have overloaded version for number and string parameters.
2013-04-11 00:40:58 +04:00
AntonAM
f9a66f3984 setuid and setgid accept string as a parameter.
Both process.setuid and process.setgid can accept either a numerical ID or a username\groupname string.
2013-04-09 17:01:12 +04:00
Andrew Gaspar
9c35a42514 Updated events module to include exported EventEmitter CLASS so it can be extended, like in the Azure library. 2013-03-31 02:08:09 -05:00
Andrew Gaspar
1f852afe5d Moved old node defs to node-0.8.8 and separated tests for each version. 2013-03-25 23:40:36 -05:00
Andrew Gaspar
70fd40a1aa Added default assert definition and a second definition for writeFile. Also added a basic test file. Will be expanded more later. 2013-03-24 22:52:11 -05:00
Crwth
ac8b309bca Update node/node.d.ts
All parameters to NodeBuffer.toString() are optional.
2013-02-15 20:14:54 -07:00