node: path.join arguments must be strings (#13715)

This commit is contained in:
Andy
2017-01-04 12:57:51 -08:00
committed by GitHub
parent c839a6579f
commit bc1da27217
2 changed files with 3 additions and 10 deletions

11
node/index.d.ts vendored
View File

@@ -2661,14 +2661,7 @@ declare module "path" {
* Join all arguments together and normalize the resulting path.
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
*
* @param paths string paths to join.
*/
export function join(...paths: any[]): string;
/**
* Join all arguments together and normalize the resulting path.
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
*
* @param paths string paths to join.
* @param paths paths to join.
*/
export function join(...paths: string[]): string;
/**
@@ -3967,7 +3960,7 @@ declare module "v8" {
Enabled = 1
}
interface HeapInfo {
interface HeapInfo {
total_heap_size: number;
total_heap_size_executable: number;
total_physical_size: number;

View File

@@ -1034,7 +1034,7 @@ namespace path_tests {
//'/foo/bar/baz/asdf'
try {
path.join('foo', {}, 'bar');
path.join('foo', 'bar');
}
catch (error) {