ambiguate<T> function

T? ambiguate<T>(
  1. T? value
)

This allows a value of type T or T? to be treated as a value of type T?.

We use this so that APIs that have become non-nullable can still be used with ! and ? to support older versions of the API as well.

Implementation

T? ambiguate<T>(T? value) => value;