From 99a3913b12bf48da08586928b877b15eb257d4b0 Mon Sep 17 00:00:00 2001 From: Benjamin Fischer Date: Fri, 14 May 2021 13:42:50 +0200 Subject: [PATCH] feat: add path types to path namespace --- src/runtime/deps.ts | 6 ++++++ types.d.ts | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/runtime/deps.ts b/src/runtime/deps.ts index 9dd081c..9668c3d 100644 --- a/src/runtime/deps.ts +++ b/src/runtime/deps.ts @@ -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"; diff --git a/types.d.ts b/types.d.ts index cc51852..c8fd863 100755 --- a/types.d.ts +++ b/types.d.ts @@ -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 { @@ -39,6 +43,13 @@ declare global { type Deferred = _Deferred; } + namespace path { + type FormatInputPathObject = _FormatInputPathObject; + type GlobOptions = _GlobOptions; + type GlobToRegExpOptions = _GlobToRegExpOptions; + type ParsedPath = _ParsedPath; + } + interface Window { // dzx $: $;