mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
change BaseRegistry to only have one type parameter (#1474)
* change BaseRegistry to only have one type parameter Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
0a5e7a048d
commit
5005d34c2e
5 files changed
+23
-10
No files matched your search
@@ -1,5 +1,7 @@
|
||||
// Common utils (main OR renderer)
|
||||
|
||||
export const noop: any = () => { /* empty */ };
|
||||
|
||||
export * from "./app-version";
|
||||
export * from "./autobind";
|
||||
export * from "./base64";
|
||||
@@ -12,3 +14,4 @@ export * from "./splitArray";
|
||||
export * from "./saveToAppFiles";
|
||||
export * from "./singleton";
|
||||
export * from "./openExternal";
|
||||
export * from "./rectify-array";
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* rectify condences the single item or array of T type, to an array.
|
||||
* @param items either one item or an array of items
|
||||
* @returns a list of items
|
||||
*/
|
||||
export function recitfy<T>(items: T | T[]): T[] {
|
||||
return Array.isArray(items) ? items : [items];
|
||||
}
|
||||
Reference in new issue
Block a user