You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In typescript, the types of nullable field are just made possibly undefined. But there is missing the | null in the type.
For example, the avatar of a DirectusUser has the following type: avatar?: string | DirectusFiles; But it should have this type: avatar: string | DirectusFiles | null;
I think it would be a good approach on this. In the meanwhile, we can check those fields for falsy values.
Btw, thank you for this great extension! Currently, there is no other tool, that satisfies my needs for type generation for Directus.
The text was updated successfully, but these errors were encountered:
stafyniaksacha
added a commit
to stafyniaksacha/directus-extension-generate-types
that referenced
this issue
Dec 29, 2022
In typescript, the types of nullable field are just made possibly undefined. But there is missing the
| null
in the type.For example, the avatar of a DirectusUser has the following type:
avatar?: string | DirectusFiles;
But it should have this type:avatar: string | DirectusFiles | null;
I think it would be a good approach on this. In the meanwhile, we can check those fields for falsy values.
Btw, thank you for this great extension! Currently, there is no other tool, that satisfies my needs for type generation for Directus.
The text was updated successfully, but these errors were encountered: