convex-helpers migrations code failing tsc
I cannot get rid of tsc failures coming out of the migration helper. I never have node modules show up in type checking, and I do have
Convex's own typecheck doesn't fail, my root project tsc does.
I've confirmed that I'm only import from
Any thoughts?
(cc/ @ian)
compilerOptions.skipLibCheckcompilerOptions.skipLibCheck set to truetrue on both of my tsconfigs.Convex's own typecheck doesn't fail, my root project tsc does.
I've confirmed that I'm only import from
convex-helpersconvex-helpers within the convex/convex/ directory.Any thoughts?
(cc/ @ian)
node_modules/convex-helpers/server/migrations.ts:365:56 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
365 .withIndex("name", (q) => q.eq("name", next[i]))
~~~~~~~
node_modules/convex-helpers/server/migrations.ts:476:35 - error TS2345: Argument of type 'FunctionReference<"mutation", "internal", { cursor?: string | null | undefined; batchSize?: number | undefined; next?: string[] | undefined; dryRun?: boolean | undefined; fn: string; }> | undefined' is not assignable to parameter of type 'SchedulableFunctionReference'.
Type 'undefined' is not assignable to type 'SchedulableFunctionReference'.
476 await ctx.scheduler.runAfter(0, fnRef, {
~~~~~
node_modules/convex-helpers/server/migrations.ts:477:25 - error TS2345: Argument of type 'FunctionReference<"mutation", "internal", { cursor?: string | null | undefined; batchSize?: number | undefined; next?: string[] | undefined; dryRun?: boolean | undefined; fn: string; }> | undefined' is not assignable to parameter of type 'AnyFunctionReference'.
Type 'undefined' is not assignable to type 'AnyFunctionReference'.
477 fn: getFunctionName(fnRef),
~~~~~
Found 3 errors in the same file, starting at: node_modules/convex-helpers/server/migrations.ts:365node_modules/convex-helpers/server/migrations.ts:365:56 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
365 .withIndex("name", (q) => q.eq("name", next[i]))
~~~~~~~
node_modules/convex-helpers/server/migrations.ts:476:35 - error TS2345: Argument of type 'FunctionReference<"mutation", "internal", { cursor?: string | null | undefined; batchSize?: number | undefined; next?: string[] | undefined; dryRun?: boolean | undefined; fn: string; }> | undefined' is not assignable to parameter of type 'SchedulableFunctionReference'.
Type 'undefined' is not assignable to type 'SchedulableFunctionReference'.
476 await ctx.scheduler.runAfter(0, fnRef, {
~~~~~
node_modules/convex-helpers/server/migrations.ts:477:25 - error TS2345: Argument of type 'FunctionReference<"mutation", "internal", { cursor?: string | null | undefined; batchSize?: number | undefined; next?: string[] | undefined; dryRun?: boolean | undefined; fn: string; }> | undefined' is not assignable to parameter of type 'AnyFunctionReference'.
Type 'undefined' is not assignable to type 'AnyFunctionReference'.
477 fn: getFunctionName(fnRef),
~~~~~
Found 3 errors in the same file, starting at: node_modules/convex-helpers/server/migrations.ts:365