Closed
Description
// There are also JS typed arguments and fields, used on the JS side, that accept null values.
extension type AppProperties._(JSObject _) implements JSObject {
// So, I can't use checks like this
factory AppProperties({void Function(({String text}))? message, int? optional}) {
if (optional == null) {
return AppProperties.__(message?.toExternalReference);
}
return AppProperties.__(message?.toExternalReference, optional: optional.toJS);
}
// No type check, can pass reference to anything.
external factory AppProperties({ExternalDartReference? message});
@JS('message')
external ExternalDartReference? _message;
void Function(({String text}))? get message {
return _message?.toDartObject as void Function(({String text}))?;
}
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done