canParse static method

bool canParse(
  1. Object? obj
)

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if (obj['detail'] is! String?) {
    return false;
  }
  if (obj['label'] is! String) {
    return false;
  }
  if (obj['length'] is! int?) {
    return false;
  }
  if (obj['selectionLength'] is! int?) {
    return false;
  }
  if (obj['selectionStart'] is! int?) {
    return false;
  }
  if (obj['sortText'] is! String?) {
    return false;
  }
  if (obj['start'] is! int?) {
    return false;
  }
  if (obj['text'] is! String?) {
    return false;
  }
  if (obj['type'] is! CompletionItemType?) {
    return false;
  }
  return true;
}