mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Simplify ResourceMapperTypeOptions optional methods
Co-authored-by: Charlie Kolb <charlie@n8n.io>
This commit is contained in:
parent
f131e9381a
commit
5640c7bd00
|
@ -1384,15 +1384,18 @@ export interface ResourceMapperTypeOptionsBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enforce at least one of resourceMapperMethod or localResourceMapperMethod
|
// Enforce at least one of resourceMapperMethod or localResourceMapperMethod
|
||||||
export type ResourceMapperTypeOptions =
|
export type ResourceMapperTypeOptionsLocal = {
|
||||||
| (ResourceMapperTypeOptionsBase & {
|
|
||||||
resourceMapperMethod: string;
|
resourceMapperMethod: string;
|
||||||
localResourceMapperMethod?: never;
|
localResourceMapperMethod?: never; // Explicitly disallows this property
|
||||||
})
|
};
|
||||||
| (ResourceMapperTypeOptionsBase & {
|
|
||||||
|
export type ResourceMapperTypeOptionsExternal = {
|
||||||
localResourceMapperMethod: string;
|
localResourceMapperMethod: string;
|
||||||
resourceMapperMethod?: never;
|
resourceMapperMethod?: never; // Explicitly disallows this property
|
||||||
});
|
};
|
||||||
|
|
||||||
|
export type ResourceMapperTypeOptions = ResourceMapperTypeOptionsBase &
|
||||||
|
(ResourceMapperTypeOptionsLocal | ResourceMapperTypeOptionsExternal);
|
||||||
|
|
||||||
type NonEmptyArray<T> = [T, ...T[]];
|
type NonEmptyArray<T> = [T, ...T[]];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue