diff --git a/src/server.ts b/src/server.ts index e919cce..a8ad7e0 100644 --- a/src/server.ts +++ b/src/server.ts @@ -67,8 +67,7 @@ const start = async () => { const removeDeclare = (text: string): string => { const lines = text.split("\n"); - const startDeclareLine = - lines.findIndex((line) => line === "declare module 'payload' {") ?? 0; + const startDeclareLine = lines.findIndex((line) => line.startsWith("declare module")) ?? 0; return lines.slice(0, startDeclareLine).join("\n"); };