diff --git a/Source/Library/Apply.ts b/Source/Library/Apply.ts index ab94d3a..a178d53 100644 --- a/Source/Library/Apply.ts +++ b/Source/Library/Apply.ts @@ -1,5 +1,5 @@ // rome-ignore lint/suspicious/noExplicitAny: -export default async (Fn: any, Test: any) => { +export default async (Fn: (args: any) => T, Test: any) => { switch (true) { case Test instanceof Map: { const Tests = new Map(); diff --git a/Source/Library/Files/In.ts b/Source/Library/Files/In.ts index c459b18..db90946 100644 --- a/Source/Library/Files/In.ts +++ b/Source/Library/Files/In.ts @@ -6,7 +6,7 @@ export default async (Path: Path, Paths: Plan["Paths"]) => { const _Path = await Apply( (Path: string) => (Path.endsWith("/") ? Path : `${Path}/`), await Apply( - (url: URL | string) => (url instanceof URL ? __Path(url) : url), + (_URL: URL | string) => (_URL instanceof URL ? __Path(_URL) : _URL), Path ) ); diff --git a/Target/Library/Apply.d.ts b/Target/Library/Apply.d.ts index 3b8bd33..a3bf2a2 100644 --- a/Target/Library/Apply.d.ts +++ b/Target/Library/Apply.d.ts @@ -1,2 +1,2 @@ -declare const _default: (Fn: any, Test: any) => Promise; +declare const _default: (Fn: (args: any) => T, Test: any) => Promise | Set>; export default _default; diff --git a/Target/Library/Apply.js b/Target/Library/Apply.js index 8ce66d7..85c241c 100644 --- a/Target/Library/Apply.js +++ b/Target/Library/Apply.js @@ -1 +1 @@ -var o=async(e,t)=>{switch(!0){case t instanceof Map:{const a=new Map;for(const[n,r]of t)a.set(await e(n),await e(r));return a}case t instanceof Set:{const a=new Set;for(const n of t)a.add(await e(n));return a}case t instanceof Array:{const a=new Array;for(const n of t)a.push(await e(n));return a}default:return await e(t)}};export{o as default}; +var s=async(e,t)=>{switch(!0){case t instanceof Map:{const a=new Map;for(const[n,r]of t)a.set(await e(n),await e(r));return a}case t instanceof Set:{const a=new Set;for(const n of t)a.add(await e(n));return a}case t instanceof Array:{const a=new Array;for(const n of t)a.push(await e(n));return a}default:return await e(t)}};export{s as default}; diff --git a/Target/Library/Files/In.js b/Target/Library/Files/In.js index 786787f..2a09d32 100644 --- a/Target/Library/Files/In.js +++ b/Target/Library/Files/In.js @@ -1 +1 @@ -import{fileURLToPath as s}from"url";import a from"../Apply.js";var r=async(e,o)=>{const n=await a(t=>t.endsWith("/")?t:`${t}/`,await a(t=>t instanceof URL?s(t):t,e));if(n instanceof Map)for(const[t,i]of n)o.set(t,i);else o.set(n,n);return o};export{r as default}; +import{fileURLToPath as r}from"url";import a from"../Apply.js";var f=async(e,o)=>{const n=await a(t=>t.endsWith("/")?t:`${t}/`,await a(t=>t instanceof URL?r(t):t,e));if(n instanceof Map)for(const[t,i]of n)o.set(t,i);else o.set(n,n);return o};export{f as default};