Skip to content

Commit

Permalink
feat: add path types to path namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed May 14, 2021
1 parent b22b929 commit 99a3913
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/runtime/deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
export * as async from "https://deno.land/std@0.93.0/async/mod.ts";
export type { Deferred } from "https://deno.land/std@0.93.0/async/mod.ts";
export * as path from "https://deno.land/std@0.93.0/path/mod.ts";
export type {
FormatInputPathObject,
GlobOptions,
GlobToRegExpOptions,
ParsedPath,
} from "https://deno.land/std@0.93.0/path/mod.ts";
export * as io from "https://deno.land/std@0.93.0/io/mod.ts";
export * as fs from "https://deno.land/std@0.93.0/fs/mod.ts";
export * as log from "https://deno.land/std@0.93.0/log/mod.ts";
Expand Down
11 changes: 11 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import type {
ArgParsingOptions as _ArgParsingOptions,
Args as _Args,
Deferred as _Deferred,
FormatInputPathObject as _FormatInputPathObject,
GlobOptions as _GlobOptions,
GlobToRegExpOptions as _GlobToRegExpOptions,
ParsedPath as _ParsedPath,
} from "./src/runtime/deps.ts";

declare global {
Expand All @@ -39,6 +43,13 @@ declare global {
type Deferred<T> = _Deferred<T>;
}

namespace path {
type FormatInputPathObject = _FormatInputPathObject;
type GlobOptions = _GlobOptions;
type GlobToRegExpOptions = _GlobToRegExpOptions;
type ParsedPath = _ParsedPath;
}

interface Window {
// dzx
$: $;
Expand Down

0 comments on commit 99a3913

Please sign in to comment.