我的问题很简单。我正在尝试将一些其他注册字段合并到我的项目中,但相反,我收到了一些似乎不太有意义的奇怪错误。
ERROR in src/assets/auth.service.ts(15,5): error TS2345: Argument of type '{ allowSignUp: boolean; additionalSignUpFields: ({ name: string; placeholder: string; type?: unde...' is not assignable to parameter of type 'Auth0LockConstructorOptions'.
Types of property 'additionalSignUpFields' are incompatible.
Type '({ name: string; placeholder: string; type?: undefined; options?: undefined; prefill?: undefined;...' is not assignable to type 'Auth0LockAdditionalSignUpField[]'.
Type '{ name: string; placeholder: string; type?: undefined; options?: undefined; prefill?: undefined; ...' is not assignable to type 'Auth0LockAdditionalSignUpField'.
Type '{ type: string; name: string; placeholder: string; options: { value: string; label: string; }[]; ...' is not assignable to type 'Auth0LockAdditionalSignUpField'.
Type '{ type: string; name: string; placeholder: string; options: { value: string; label: string; }[]; ...' is not assignable to type 'Auth0LockAdditionalCheckboxSignUpField'.
Types of property 'type' are incompatible.
Type 'string' is not assignable to type '"checkbox"'.
这是我的其他SignUp选项:
additionalSignUpFields: [
{
name: "first_name",
placeholder: "Enter your first name"
},
{
name: "last_name",
placeholder: "Enter your last name"
},
{
type: "select",
name: "connection",
placeholder: "How did you hear about us?",
options: [
{ value:'conference', label: 'conference'},
{ value: 'presentation', label: 'webinar/presentation'},
{ value: 'web', label: 'web search'},
{ value: 'fb', label: 'facebook'},
{ value: 'ig', label: 'instagram'},
{ value: 'tw', label: 'twitter'}
],
prefill: "us"
}
],