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
|
||||
export type ResourceMapperTypeOptions =
|
||||
| (ResourceMapperTypeOptionsBase & {
|
||||
resourceMapperMethod: string;
|
||||
localResourceMapperMethod?: never;
|
||||
})
|
||||
| (ResourceMapperTypeOptionsBase & {
|
||||
localResourceMapperMethod: string;
|
||||
resourceMapperMethod?: never;
|
||||
});
|
||||
export type ResourceMapperTypeOptionsLocal = {
|
||||
resourceMapperMethod: string;
|
||||
localResourceMapperMethod?: never; // Explicitly disallows this property
|
||||
};
|
||||
|
||||
export type ResourceMapperTypeOptionsExternal = {
|
||||
localResourceMapperMethod: string;
|
||||
resourceMapperMethod?: never; // Explicitly disallows this property
|
||||
};
|
||||
|
||||
export type ResourceMapperTypeOptions = ResourceMapperTypeOptionsBase &
|
||||
(ResourceMapperTypeOptionsLocal | ResourceMapperTypeOptionsExternal);
|
||||
|
||||
type NonEmptyArray<T> = [T, ...T[]];
|
||||
|
||||
|
|
Loading…
Reference in a new issue