You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
The update made in #6158 to support dash casing results in properties being added twice in the components.d.ts, in both camelCase and dash-case (with an added @deprecated comment for dash-case properties). While this solves the initial issue highlighted in #6150, it is not necessarily needed for all projects.
I'm going to open a PR to add a config option (noDashCaseTypes?) that allows for the generation of dash-cased properties to be skipped.
Describe the Use Case
Users who are not using dash-casing in JSX templates do not need dash-cased types to be added to components.d.ts and should be able to skip this if necessary.
In our particular project, we have a script that uses components.d.ts to generate types files for React components - we could update our script to ignore duplicated types in dash-case (also not supported by React), but having the option to switch off this feature for users who were not facing the initial issue (#6150) would be useful.
Describe Preferred Solution
I'm planning on opening a PR that will:
Add a noDashCaseTypes? option to the StencilConfig interface
Use this to determine whether to skip the generation of dash-case types in components.d.ts
Update tests to account for this option
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
… generation
Allows for `noDashCaseTypes` to be set in Config to prevent generation of non-camelCase types from attribute names in `components.d.ts` during build.
fixes: stenciljs#6178
feat: allow dash-case type generation to be optional
Prerequisites
Describe the Feature Request
The update made in #6158 to support dash casing results in properties being added twice in the
components.d.ts
, in both camelCase and dash-case (with an added@deprecated
comment for dash-case properties). While this solves the initial issue highlighted in #6150, it is not necessarily needed for all projects.I'm going to open a PR to add a config option (
noDashCaseTypes?
) that allows for the generation of dash-cased properties to be skipped.Describe the Use Case
Users who are not using dash-casing in JSX templates do not need dash-cased types to be added to
components.d.ts
and should be able to skip this if necessary.In our particular project, we have a script that uses
components.d.ts
to generate types files for React components - we could update our script to ignore duplicated types in dash-case (also not supported by React), but having the option to switch off this feature for users who were not facing the initial issue (#6150) would be useful.Describe Preferred Solution
I'm planning on opening a PR that will:
noDashCaseTypes?
option to theStencilConfig
interfacecomponents.d.ts
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: