diff --git a/packages/scripts/deps.ts b/packages/scripts/deps.ts index 505de8af4..167b5dc17 100644 --- a/packages/scripts/deps.ts +++ b/packages/scripts/deps.ts @@ -1,2 +1,2 @@ export * as path from "https://deno.land/std@0.208.0/path/mod.ts"; -export * as tsMorph from "https://deno.land/x/ts_morph@21.0.0/mod.ts"; +export * as tsMorph from "https://deno.land/x/ts_morph@21.0.1/mod.ts"; diff --git a/packages/scripts/utils/Memoize.ts b/packages/scripts/utils/Memoize.ts index 6f094fe7a..f0059830c 100644 --- a/packages/scripts/utils/Memoize.ts +++ b/packages/scripts/utils/Memoize.ts @@ -1,11 +1,10 @@ -/** Decorator for memoizing the result of a method or get accessor. */ -export function Memoize(target: any, propertyName: string, descriptor: TypedPropertyDescriptor) { - if (descriptor.value != null) - descriptor.value = getNewFunction(descriptor.value); - else if (descriptor.get != null) - descriptor.get = getNewFunction(descriptor.get); - else - throw new Error("Only put a Memoize decorator on a method or get accessor."); +/** Decorator for memoizing the result of a method. */ +export function Memoize(target: (...args: any[]) => void) { + if (target instanceof Function) { + return getNewFunction(target); + } else { + throw new Error("Not implemented."); + } } const weakMap = new WeakMap>(); diff --git a/packages/ts-morph/scripts/generation/main.ts b/packages/ts-morph/scripts/generation/main.ts index 93dafee77..9acc2555d 100644 --- a/packages/ts-morph/scripts/generation/main.ts +++ b/packages/ts-morph/scripts/generation/main.ts @@ -1,4 +1,3 @@ -import { tsMorph } from "../deps.ts"; import { InspectorFactory } from "../inspectors/mod.ts"; import { createDeclarationFile } from "./createDeclarationFile.ts"; import { createForEachStructureChild } from "./createForEachStructureChild.ts";