mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +00:00
Added generic type to assignLength method
This commit is contained in:
@@ -87,6 +87,6 @@ export function generateStringFile(lang: { [index: string]: string }): Buffer {
|
||||
* @param {Array<Object<string, any>>} source - the main sources of properties
|
||||
*/
|
||||
|
||||
export function assignLength(length: number, ...sources: Array<{ [key: string]: any }>): Array<{ [key: string]: any }> {
|
||||
export function assignLength<T>(length: number, ...sources: Array<{ [key: string]: any }>): { [key: string]: any } & T {
|
||||
return Object.assign({ length }, ...sources);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user