-
Notifications
You must be signed in to change notification settings - Fork 217
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
Error in TypeScript #3
Comments
Also, in the form, I had to do
to avoid getting |
And for validations do
and also had to import formState twice to get isValid and isDirty states working |
Also for |
Had the same issue. I used JS for the files consuming the PostFeed component |
There's no reason to switch to JS. If you ever find yourself in a situation where Typescript is complaining, just put |
I've tried that, but I don't know why it didn't work.
|
When i was doing the Course i found an error that prevented to upload the project to Vercel, the error itself did not cause any problem to the website, it was just that TypeScript complained.
The Error was
'Argument of type 'string | string[]' is not assignable to parameter of type 'string'. Type 'string[]' is not assignable to type 'string'.'
The string is the slug, and to fix it you need to convert the slug to a string (I'm fairly new to programming, but wasn't the slug a string already?)
anyway, you have to make the slug a string, with
let StringSlug = (slug as string)
and replace.doc(slug);
to.doc(StringSlug);
/pages/admin/[slug].tsx
The text was updated successfully, but these errors were encountered: