At the moment, this snippet:
```ts
const spawnArgs: ReadonlyArray<string> = ['foo', 'bar'];
spawn('foobar', spawnArgs);
```
fails with:
```
Argument of type 'ReadonlyArray<string>' is not assignable to parameter of type 'string[] | undefined'.
Type 'ReadonlyArray<string>' is not assignable to type 'string[]'.
```
Looking at https://github.com/nodejs/node/blob/master/lib/child_process.js#L514-L535 and https://github.com/nodejs/node/blob/master/lib/internal/child_process.js#L286, it _looks_ like there is no mutation of the array. I am no expert so I'd be happy to be proven wrong, I just couldn't find sufficient evidence that a `ReadonlyArray` wouldn't be fine.
This is not a breaking change because passing a `string[]` is still valid.
Writable's write function accepts chunks of type any to permit object-mode
usage. The implementations you can provide to Writable's constructor should
do the same.
* Update type of path.sep and path.delimiter
* Change `path.sep` to `'\\' | '/'`
* Change `path.delimiter` to `';' | ':'`
* Update index.d.ts
* Change types of path.sep and path.delimiter in types/node/{v8,v6}
* Change types of path.sep and path.delimiter in types/node/v7
* Fix Node's path.format() requiring all options
The bug manifested during use of path.win32 and path.posix submodules.
Both functions required all of the options to exist which is not
the case as some override others.
Further research indicated that previous Node versions were also
susceptible, up to v4.
I've used the Typescript's Partial<> type which makes all properties
optional, allowing for easier maintenance and readabillity at the cost
of now requiring Typescript 2.1, which I believe is a good trade-off.
* Revert the decision to use TS 2.1 in @types/node
Updating Typescript version would require to update
all other types that rely on Node, which may be quite a lot.
Fixing a bug is not a big enough reason to add new version to all
of those packages.
Add `Buffer.alloc`, `Buffer.allocUnsafe` and `Buffer.allocUnsafeSlow`
class methods that were backported to node v4 (starting with v4.5).
In addition add tests to all node versions for these class methods and
fix tslint configuration to pass the tests