-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nested default value are not supported #454
Labels
Comments
Hey @ubiqart, Thank you for raising this. We've managed to replicate the issue, so we're categorizing it as a bug for the team to investigate further. |
@AnilMaktala - can we verify if this behavior exists in Gen 1 |
i.e. type CustomType {
test: Int @default(value: "1")
} |
Given this isn't supported in Gen 1, we'll deprioritize for now. We should still do this feature in the future. Just want us to prioritize feature parity with Gen 1 first. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment information
Description
Nested Enum types are not supported
const schema = a.schema({
Prompt: a.customType({
text: a.string().required(),
weight: a.integer().required()
}),
Configuration: a.customType({
cfg_scale: a.integer().default(7),
...
error TS2322: Type 'ModelField<Nullable, "default", undefined>' is not assignable to type 'ModelField<ModelFieldTypeParamOuter, CustomTypeAllowedModifiers, any>'.
Property 'default' is missing in type 'Omit<{ required(): ModelField<number, "required" | "default", undefined>; array(): ModelField<Nullable[] | null, "array" | "default", undefined>; default(value: ModelFieldTypeParamOuter): ModelField<...>; authorization<AuthRuleType extends Authorization<...>>(rules: AuthRuleType[]): ModelField<...>; }, "defa...' but required in type 'Omit<{ required(): ModelField<string | number | boolean | object | any[] | Date | ModelFieldTypeParamInner[], CustomTypeAllowedModifiers, undefined>; array(): ModelField<...>; default(value: ModelFieldTypeParamOuter): ModelField<...>; authorization<AuthRuleType extends Authorization<...>>(rules: AuthRuleType[]): Mod...'.
The text was updated successfully, but these errors were encountered: