Skip to content

Commit 12aaf04

Browse files
squash!
1 parent 0b524d5 commit 12aaf04

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

Source/Function/Get.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @module Get
33
*
44
*/
5-
export const _Function = ((...[Instance]: Parameters<Type>) => {
5+
export default (async (...[Instance]: Parameters<Type>) => {
66
if (typeof Instance === "string") {
77
return Instance;
88
}
@@ -16,7 +16,12 @@ export const _Function = ((...[Instance]: Parameters<Type>) => {
1616
typeof Instance[Key] === "object" &&
1717
!Array.isArray(Instance[Key])
1818
) {
19-
_Map.set(Key, _Function(Instance[Key]));
19+
_Map.set(
20+
Key,
21+
await (await import("@Function/Get.js")).default(
22+
Instance[Key],
23+
),
24+
);
2025
} else {
2126
_Map.set(Key, Instance[Key]);
2227
}
@@ -27,6 +32,4 @@ export const _Function = ((...[Instance]: Parameters<Type>) => {
2732
return _Map;
2833
}) satisfies Type as Type;
2934

30-
export default _Function;
31-
3235
import type Type from "../Interface/Get.js";

Source/Function/Put.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @module Put
33
*
44
*/
5-
export const _Function = ((...[Instance]: Parameters<Type>) => {
5+
export default (async (...[Instance]: Parameters<Type>) => {
66
if (Instance instanceof Map) {
77
const _Value = {} as {
88
// biome-ignore lint/suspicious/noExplicitAny:
@@ -11,7 +11,9 @@ export const _Function = ((...[Instance]: Parameters<Type>) => {
1111

1212
for (const [Key, Value] of Instance.entries()) {
1313
if (Value instanceof Map) {
14-
_Value[Key] = _Function(Value);
14+
_Value[Key] = await (await import("@Function/Put.js")).default(
15+
Value,
16+
);
1517
} else {
1618
_Value[Key] = Value;
1719
}
@@ -24,5 +26,3 @@ export const _Function = ((...[Instance]: Parameters<Type>) => {
2426
}) satisfies Type as Type;
2527

2628
import type Type from "../Interface/Put.js";
27-
28-
export default _Function;

Source/Interface/Get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ export default interface Type {
1414
// biome-ignore lint/suspicious/noExplicitAny:
1515
[key: string]: any;
1616
// biome-ignore lint/suspicious/noExplicitAny:
17-
}): Map<any, any>;
17+
}): Promise<Map<any, any>>;
1818
}

Source/Interface/Put.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ export default interface Type {
1010
* type. It is used to represent an instance of a class or an object.
1111
*
1212
*/
13-
(Instance: unknown): unknown;
13+
(Instance: unknown): Promise<unknown>;
1414
}

0 commit comments

Comments
 (0)