With strict inference enabled, this code:
import 'package:js/js.dart';
@JS()
external set foo(int value);
Produces the following analysis hint:
Analyzing test.dart...
hint • The return type of 'foo' cannot be inferred. • test.dart:3:1 • inference_failure_on_function_return_type
1 hint found.
Adding a return type causes a lint to complain that setters shouldn't declare return types, so it's a lose-lose situation.