@dbs-portal/core-module-registry
Version:
Core module registry system for automatic module discovery and registration
76 lines • 2.23 kB
TypeScript
/**
* Browser-compatible path utilities
*
* Provides path manipulation functions that work in browser environments
* while maintaining compatibility with Node.js path module API.
*/
export interface PathUtils {
resolve(...paths: string[]): string;
join(...paths: string[]): string;
dirname(path: string): string;
basename(path: string, ext?: string): string;
extname(path: string): string;
relative(from: string, to: string): string;
isAbsolute(path: string): boolean;
normalize(path: string): string;
sep: string;
delimiter: string;
}
declare class BrowserPath implements PathUtils {
readonly sep = "/";
readonly delimiter = ":";
/**
* Resolve path segments into an absolute path
*/
resolve(...paths: string[]): string;
/**
* Join path segments
*/
join(...paths: string[]): string;
/**
* Get directory name
*/
dirname(path: string): string;
/**
* Get base name
*/
basename(path: string, ext?: string): string;
/**
* Get file extension
*/
extname(path: string): string;
/**
* Get relative path
*/
relative(from: string, to: string): string;
/**
* Check if path is absolute
*/
isAbsolute(path: string): boolean;
/**
* Normalize path
*/
normalize(path: string): string;
/**
* Normalize path array
*/
private normalizeArray;
/**
* Get current directory (browser simulation)
*/
private getCurrentDirectory;
}
declare const browserPath: BrowserPath;
export declare const resolve: (...paths: string[]) => string;
export declare const join: (...paths: string[]) => string;
export declare const dirname: (path: string) => string;
export declare const basename: (path: string, ext?: string) => string;
export declare const extname: (path: string) => string;
export declare const relative: (from: string, to: string) => string;
export declare const isAbsolute: (path: string) => boolean;
export declare const normalize: (path: string) => string;
export declare const sep = "/";
export declare const delimiter = ":";
export default browserPath;
export { BrowserPath };
//# sourceMappingURL=browser-path.d.ts.map