parse method

TypedElement parse(
  1. DartObject typedObject
)

Parses the value of a compile-time constant Typed expression.

Implementation

TypedElement parse(DartObject typedObject) {
  if (!$Typed.isExactlyType(typedObject.type!)) {
    final typeStr = typeToCode(typedObject.type);
    throw BuildError.withoutContext(
      ''
      'Expected an expression of type "Typed", but got "$typeStr"',
    );
  }
  return _parseTyped(typedObject, root: true);
}