getSyncOrNoneK<T extends Object> method

Option<T> getSyncOrNoneK<T extends Object>(
  1. Entity typeEntity, {
  2. Entity groupEntity = const DefaultEntity(),
  3. bool traverse = true,
})
inherited

Retrieves the synchronous dependency or None if not found or async. Single exhaustive pattern collapses the Option × Resolvable × Result state space — every "not found / not sync / not ok" branch falls into the wildcard.

Implementation

Option<T> getSyncOrNoneK<T extends Object>(
  Entity typeEntity, {
  Entity groupEntity = const DefaultEntity(),
  bool traverse = true,
}) {
  return switch (getK<T>(
    typeEntity,
    groupEntity: groupEntity,
    traverse: traverse,
  )) {
    Some(value: Sync(value: Ok(value: final v))) => Some(v),
    _ => const None(),
  };
}