summaryrefslogtreecommitdiff
path: root/std/path/_interface.ts
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-05-31 18:48:32 +0100
committerGitHub <noreply@github.com>2020-05-31 13:48:32 -0400
commit10573183af14b4f303909ee9394e0e72cf10b45d (patch)
tree45a2136c24d8cbb7d36218f9d1c10432bef301f8 /std/path/_interface.ts
parent464f5bf769f23b85ecc2c99b54b639c5a71d700f (diff)
fix(std/path): Support browsers (#6003)
Diffstat (limited to 'std/path/_interface.ts')
-rw-r--r--std/path/_interface.ts29
1 files changed, 29 insertions, 0 deletions
diff --git a/std/path/_interface.ts b/std/path/_interface.ts
new file mode 100644
index 000000000..6c82c9c35
--- /dev/null
+++ b/std/path/_interface.ts
@@ -0,0 +1,29 @@
+/** This module is browser compatible. */
+
+/**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+export interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+}
+
+export type FormatInputPathObject = Partial<ParsedPath>;