-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsure on ArkType implementation / maybe an issue #320
Comments
Also tried the following: server: type({
DATABASE_URL: /^postgres:\/\/.+/,
GOOGLE_CLIENT_ID: /^.*.apps.googleusercontent.com$/,
GOOGLE_CLIENT_SECRET: "string == 35",
})['~standard'],
// Type 'ArkTypeProps<{ DATABASE_URL: string; GOOGLE_CLIENT_ID: string; GOOGLE_CLIENT_SECRET: string; }, { DATABASE_URL: string; GOOGLE_CLIENT_ID: string; GOOGLE_CLIENT_SECRET: string; }>' is not assignable to type 'Partial<{ [x: string]: StandardSchemaV1<unknown, unknown>; }>'.
// Index signature for type 'string' is missing in type 'ArkTypeProps<{ DATABASE_URL: string; GOOGLE_CLIENT_ID: string; GOOGLE_CLIENT_SECRET: string; }, { DATABASE_URL: string; GOOGLE_CLIENT_ID: string; GOOGLE_CLIENT_SECRET: string; }>'.
// Related information:
// * index.d.ts#165,5: The expected type comes from property 'server' which is declared here on type 'EnvOptions<"NEXT_PUBLIC_", TServerFormat, {}, {}, []>' DATABASE_URL: type(/^postgres:\/\/.+/)["~standard"],
// Property '"~standard"' is missing in type 'ArkTypeProps<string, string>' but required in type 'StandardSchemaV1<unknown, unknown>'.
// Related information:
// * index.d.ts#4,14: '"~standard"' is declared here. |
Hey @ssalbdivad - do you have any ideas? |
@juliusmarminge This may be due to some issues in TS with how the outer context of a function can affect nested inference. I'm making some changes to try and work around this in 2.1.0 that will hopefully avoid the issues inlining the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to use Standard Schema from ArkType but I'm not getting proper types here.
The text was updated successfully, but these errors were encountered: