gen-jhipster
Version:
VHipster - Spring Boot + Angular/React/Vue in one handy generator
37 lines (36 loc) • 1.62 kB
TypeScript
/**
* Copyright 2013-2026 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { EditFileCallback } from '../api.ts';
/**
* TODO move to utils when converted to typescripts
* Converts multiples EditFileCallback callbacks into one.
*/
export declare function joinCallbacks<Generator>(...callbacks: EditFileCallback<Generator>[]): EditFileCallback<Generator>;
/**
* Utility function add condition to every block in addition to the already existing condition.
*/
export declare function addSectionsCondition(files: Record<string, any[]>, commonCondition: (...args: any[]) => boolean): {
[k: string]: any[];
};
/**
* Utility function to merge sections (jhipster files structure)
* Merging { foo: [blocks1], bar: [block2]} and { foo: [blocks3], bar: [block4]}
* Results in { foo: [blocks1, block3], bar: [block2, block4]}
*/
export declare function mergeSections(...allFiles: Record<string, any>[]): Record<string, any[]>;