(...paths: string[])
| 78 | export function filePathJoin(...paths: RelativePosixFilePath[]): RelativePosixFilePath |
| 79 | export function filePathJoin(...paths: [AbsolutePosixFilePath, ...string[]]): AbsolutePosixFilePath |
| 80 | export function filePathJoin(...paths: string[]): RelativePosixFilePath | AbsolutePosixFilePath { |
| 81 | if (paths.length > 0 && path.isAbsolute(paths[0]!)) { |
| 82 | if (paths.slice(1).some(path.isAbsolute)) { |
| 83 | throw new Error(`All path segments except the first are expected to be relative, got ${paths}`) |
| 84 | } |
| 85 | |
| 86 | return unknownToAbsolutePosixFilePath(path.join(...paths)) |
| 87 | } |
| 88 | |
| 89 | return unknownToRelativePosixFilePath(path.join(...paths)) |
| 90 | } |
| 91 | |
| 92 | export function dirname(path_: RelativePosixFilePath): RelativePosixFilePath |
| 93 | export function dirname(path_: AbsolutePosixFilePath): AbsolutePosixFilePath |
no test coverage detected
searching dependent graphs…