Skip to content

Commit

Permalink
Revert breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronlademann-wf committed Mar 4, 2024
1 parent daed633 commit e65c049
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/src/component/ref_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Ref<T?> createRef<T>() => react_interop.createRef();
/// _$Foo2Config, // ignore: undefined_identifier
/// );
UiFactory<TProps> uiForwardRef<TProps extends bh.UiProps>(
ReactNode Function(TProps props, dynamic ref) functionComponent, dynamic _config) {
/*ReactNode*/ dynamic Function(TProps props, dynamic ref) functionComponent, dynamic _config) {
ArgumentError.checkNotNull(_config, '_config');

if (_config is! UiFactoryConfig<TProps>) {
Expand All @@ -231,7 +231,7 @@ UiFactory<TProps> uiForwardRef<TProps extends bh.UiProps>(
// this will be an empty string.
final displayName = config.displayName ?? getFunctionName(functionComponent);

ReactNode _uiFunctionWrapper(JsBackedMap props, dynamic ref) {
/*ReactNode*/ dynamic _uiFunctionWrapper(JsBackedMap props, dynamic ref) {
return functionComponent(propsFactory!.jsMap(props), ref);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/component_declaration/function_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export 'component_type_checking.dart'
/// Learn more: <https://reactjs.org/docs/components-and-props.html#function-and-class-components>.
// TODO: right now only top level factory declarations will generate props configs.
UiFactory<TProps> uiFunction<TProps extends UiProps>(
ReactNode Function(TProps props) functionComponent,
/*ReactNode*/ dynamic Function(TProps props) functionComponent,
dynamic _config,
) {
ArgumentError.checkNotNull(_config, '_config');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ main() {
GenericUiProps props;

setUp(() {
final genericFactory = uiFunction<UiProps>((_) { return null; }, UiFactoryConfig());
final genericFactory = uiFunction<UiProps>((_) {}, UiFactoryConfig());
final factoryProps = genericFactory();
expect(factoryProps, isA<GenericUiProps>(), reason: 'test setup check');
props = factoryProps as GenericUiProps;
Expand Down

0 comments on commit e65c049

Please sign in to comment.