dcoDecodeString function

String dcoDecodeString(
  1. Object? raw
)

This is only intended to be used by automatically generated code, instead of developers.

Implementation

String dcoDecodeString(Object? raw) {
  if (raw is String) return raw;
  if (raw is JSAny) {
    if (raw.typeofEquals('string')) return (raw as JSString).toDart;
    final dartified = raw.dartify();
    if (dartified is String) return dartified;
  }
  throw Exception(
    'dcoDecodeString see unexpected type=${raw.runtimeType} value=$raw',
  );
}