Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS] regression in 5.0-alpha8: Unable to find a valid constructor for generating interface via ParamObject #4040

Closed
goswinr opened this issue Feb 10, 2025 · 4 comments

Comments

@goswinr
Copy link
Contributor

goswinr commented Feb 10, 2025

in Fable 4 and up till 5.0-alpha7 I did not have this error when targeting TS:

Unable to find a valid constructor for generating interface via ParamObject, please make sure the constructor has at least one parameter.
Compilation failed

here is a minimal repo to reproduce :

https://github.com/goswinr/Fable5.0-alpha8TS-bug/tree/main

This file cause the error. My workaround to inherit from interfaces,
as a way to create webcomponents:
https://github.com/goswinr/Fable5.0-alpha8TS-bug/blob/main/Inheritable.fs

Is this the same as #4025 ?

@goswinr goswinr changed the title regression in 5.0-alpha8: Unable to find a valid constructor for generating interface via ParamObject [TS] regression in 5.0-alpha8: Unable to find a valid constructor for generating interface via ParamObject Feb 10, 2025
@MangelMaxime
Copy link
Member

I need to check but I think it will be fixed with #4036 because we are reverting the changes made to generate types for ParamObject + Global.

Instead, we want to introduce a new attribute for this special combo.

@MangelMaxime
Copy link
Member

@goswinr Can you please check if the problem still exist with Fable-alpha.10 ?

@goswinr
Copy link
Contributor Author

goswinr commented Feb 16, 2025

@MangelMaxime it's fixed in my minimal test repo, thanks

@goswinr
Copy link
Contributor Author

goswinr commented Feb 17, 2025

it's also fixed for my much larger app at work, thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants