@yarnpkg/fslib
Advanced tools
Comparing version 3.0.0-rc.38 to 3.0.0-rc.39
@@ -36,5 +36,13 @@ declare enum PathType { | ||
}; | ||
export type TolerateLiterals<T> = { | ||
[K in keyof T]: ValidateLiteral<T[K]> | PortablePath | Filename; | ||
}; | ||
export type ValidateLiteral<T> = T extends `${infer X}` ? T : never; | ||
export interface PortablePathGenerics { | ||
join<T extends Array<string>>(...segments: TolerateLiterals<T>): PortablePath; | ||
resolve<T extends string>(...pathSegments: Array<PortablePath | Filename | TolerateLiterals<T>>): PortablePath; | ||
} | ||
export type FSPath<T extends Path> = T | number; | ||
export declare const npath: PathUtils<NativePath> & ConvertUtils; | ||
export declare const ppath: PathUtils<PortablePath>; | ||
export declare const ppath: PathUtils<PortablePath> & PortablePathGenerics; | ||
export interface ParsedPath<P extends Path> { | ||
@@ -54,7 +62,8 @@ root: P; | ||
} | ||
type NoInfer<T> = [T][T extends any ? 0 : never]; | ||
export interface PathUtils<P extends Path> { | ||
cwd(): P; | ||
join(...paths: Array<NoInfer<P> | Filename>): P; | ||
resolve(...pathSegments: Array<NoInfer<P> | Filename>): P; | ||
normalize(p: P): P; | ||
join(...paths: Array<P | Filename>): P; | ||
resolve(...pathSegments: Array<P | Filename>): P; | ||
isAbsolute(path: P): boolean; | ||
@@ -61,0 +70,0 @@ relative(from: P, to: P): P; |
{ | ||
"name": "@yarnpkg/fslib", | ||
"version": "3.0.0-rc.38", | ||
"version": "3.0.0-rc.39", | ||
"stableVersion": "2.10.1", | ||
@@ -16,3 +16,3 @@ "license": "BSD-2-Clause", | ||
"devDependencies": { | ||
"@yarnpkg/libzip": "^3.0.0-rc.38" | ||
"@yarnpkg/libzip": "^3.0.0-rc.39" | ||
}, | ||
@@ -19,0 +19,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221516
5674