( set: Set<AnyObject>, parentScopes: AnyObject[], key: ResolverObjectKey, parentFallback: ResolverObjectKey, value: unknown )
| 307 | : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined; |
| 308 | |
| 309 | function addScopes( |
| 310 | set: Set<AnyObject>, |
| 311 | parentScopes: AnyObject[], |
| 312 | key: ResolverObjectKey, |
| 313 | parentFallback: ResolverObjectKey, |
| 314 | value: unknown |
| 315 | ) { |
| 316 | for (const parent of parentScopes) { |
| 317 | const scope = getScope(key, parent); |
| 318 | if (scope) { |
| 319 | set.add(scope); |
| 320 | const fallback = resolveFallback(scope._fallback, key, value); |
| 321 | if (typeof fallback !== 'undefined' && fallback !== key && fallback !== parentFallback) { |
| 322 | // When we reach the descriptor that defines a new _fallback, return that. |
| 323 | // The fallback will resume to that new scope. |
| 324 | return fallback; |
| 325 | } |
| 326 | } else if (scope === false && typeof parentFallback !== 'undefined' && key !== parentFallback) { |
| 327 | // Fallback to `false` results to `false`, when falling back to different key. |
| 328 | // For example `interaction` from `hover` or `plugins.tooltip` and `animation` from `animations` |
| 329 | return null; |
| 330 | } |
| 331 | } |
| 332 | return false; |
| 333 | } |
| 334 | |
| 335 | function createSubResolver( |
| 336 | parentScopes: AnyObject[], |
no test coverage detected