mirror of
https://github.com/directus/directus.git
synced 2026-02-13 18:34:55 -05:00
Fix TS 4.0 warnings
This commit is contained in:
@@ -291,21 +291,21 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
state.newCollections.map((newCollection: Partial<Collection> & { $type: string }) => {
|
||||
state.newCollections.map((newCollection: Partial<Collection> & { $type?: string }) => {
|
||||
delete newCollection.$type;
|
||||
return api.post(`/collections`, newCollection);
|
||||
})
|
||||
);
|
||||
|
||||
await Promise.all(
|
||||
state.newFields.map((newField: Partial<Field> & { $type: string }) => {
|
||||
state.newFields.map((newField: Partial<Field> & { $type?: string }) => {
|
||||
delete newField.$type;
|
||||
return api.post(`/fields/${newField.collection}`, newField);
|
||||
})
|
||||
);
|
||||
|
||||
await Promise.all(
|
||||
state.updateFields.map((updateField: Partial<Field> & { $type: string }) => {
|
||||
state.updateFields.map((updateField: Partial<Field> & { $type?: string }) => {
|
||||
delete updateField.$type;
|
||||
return api.post(`/fields/${updateField.collection}/${updateField.field}`, updateField);
|
||||
})
|
||||
|
||||
@@ -302,7 +302,7 @@ export default defineComponent({
|
||||
...props.field,
|
||||
field: duplicateName.value,
|
||||
collection: duplicateTo.value,
|
||||
};
|
||||
} as Field & { name?: string; meta: { id?: number; sort?: number } };
|
||||
|
||||
if (newField.meta) {
|
||||
delete newField.meta.id;
|
||||
|
||||
Reference in New Issue
Block a user