( raw: ComponentInjectOptions | undefined, )
| 1065 | } |
| 1066 | |
| 1067 | function normalizeInject( |
| 1068 | raw: ComponentInjectOptions | undefined, |
| 1069 | ): ObjectInjectOptions | undefined { |
| 1070 | if (isArray(raw)) { |
| 1071 | const res: ObjectInjectOptions = {} |
| 1072 | for (let i = 0; i < raw.length; i++) { |
| 1073 | res[raw[i]] = raw[i] |
| 1074 | } |
| 1075 | return res |
| 1076 | } |
| 1077 | return raw |
| 1078 | } |
| 1079 | |
| 1080 | function mergeAsArray<T = Function>(to: T[] | T | undefined, from: T | T[]) { |
| 1081 | return to ? [...new Set([].concat(to as any, from as any))] : from |
no outgoing calls
no test coverage detected