( user: ExternalOption, id: string, parentId: string | undefined, isResolved: boolean, )
| 1198 | typeof log === 'string' ? { message: log } : log |
| 1199 | |
| 1200 | export function resolveUserExternal( |
| 1201 | user: ExternalOption, |
| 1202 | id: string, |
| 1203 | parentId: string | undefined, |
| 1204 | isResolved: boolean, |
| 1205 | ): boolean | null | void { |
| 1206 | if (typeof user === 'function') { |
| 1207 | return user(id, parentId, isResolved) |
| 1208 | } else if (Array.isArray(user)) { |
| 1209 | return user.some((test) => isExternal(id, test)) |
| 1210 | } else { |
| 1211 | return isExternal(id, user) |
| 1212 | } |
| 1213 | } |
| 1214 | |
| 1215 | function isExternal(id: string, test: string | RegExp) { |
| 1216 | if (typeof test === 'string') { |
no test coverage detected