Skip to content

Commit

Permalink
fix: Drop debug logging for closures until there is support for runti…
Browse files Browse the repository at this point in the history
…me parameter detection
  • Loading branch information
pojntfx committed Jan 5, 2024
1 parent 8e010f0 commit 93c1d2e
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions ts/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,33 +134,8 @@ export class Registry<L extends ILocal, R extends IRemote> {
const l: L = {} as L;
// eslint-disable-next-line no-restricted-syntax, guard-for-in
for (const functionName in local) {
// eslint-disable-next-line @typescript-eslint/no-loop-func
(l as any)[functionName] = async (...args: any[]) => {
if (args[0] instanceof Params) {
}
try {
console.log(args);

console.log("Hey!", typia.is<Params>(args));
} catch (e) {
console.error(e);

throw e;
}

// console.log(typeof fn);
// type Fn = ReturnType<typeof fn>;
// if (args instanceof Function) {
// }
// type TestParams = Parameters<(a: string, b: number) => void>; // [string, number]
// type SecondParam = TestParams[1]; // number
// console.log(typeof SecondParam);
// type a = args[0];
// console.log(args[0]);
// args.map((arg, i) =>
// console.log(i, arg, local[functionName].arguments)
// );
};
(l as any)[functionName] = (...args: any[]) =>
(local as any)[functionName](...args);
}

this.local = l;
Expand Down

0 comments on commit 93c1d2e

Please sign in to comment.