Skip to content

Commit

Permalink
chore: fix build (#1504)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Feb 11, 2024
1 parent 930779a commit 715bd0d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/scripts/deps.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * as path from "https://deno.land/[email protected]/path/mod.ts";
export * as tsMorph from "https://deno.land/x/[email protected].0/mod.ts";
export * as tsMorph from "https://deno.land/x/[email protected].1/mod.ts";
15 changes: 7 additions & 8 deletions packages/scripts/utils/Memoize.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/** Decorator for memoizing the result of a method or get accessor. */
export function Memoize(target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) {
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<object, Map<string, unknown>>();
Expand Down
1 change: 0 additions & 1 deletion packages/ts-morph/scripts/generation/main.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 715bd0d

Please sign in to comment.