mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
node: path.join arguments must be strings (#13715)
This commit is contained in:
11
node/index.d.ts
vendored
11
node/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -1034,7 +1034,7 @@ namespace path_tests {
|
||||
//'/foo/bar/baz/asdf'
|
||||
|
||||
try {
|
||||
path.join('foo', {}, 'bar');
|
||||
path.join('foo', 'bar');
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user