-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
3.0.0-rc: type error #8679
Comments
I'm not sure what would be the error here. Maybe you need to re-export the Line 1152 in 81342d6
|
The problem here seems to be how the scale gets exported after the build. We use this pattern of declaration merging to define the constructor for the objects that need it. My guess is that once built, the declaration merging is broken. Src Typesexport interface Scale<O extends CoreScaleOptions = CoreScaleOptions> extends Element<{}, O>, LayoutItem {
....
}
export const Scale: {
prototype: Scale;
new <O extends CoreScaleOptions = CoreScaleOptions>(cfg: AnyObject): Scale<O>;
}; Built Typesinterface Scale<O extends CoreScaleOptions = CoreScaleOptions> extends Element<{}, O>, LayoutItem {
...
}
declare const Scale: {
prototype: Scale;
new <O extends CoreScaleOptions = CoreScaleOptions>(cfg: AnyObject): Scale<O>;
}; |
https://stackoverflow.com/questions/66135714/typescript-type-definitions-how-to-declare-class-constructors indicates that one way to handle this would be to use |
Expected Behavior
I'm trying to bundle my typings using https://github.com/Swatinem/rollup-plugin-dts. However, it fails with the following error:
see also https://github.com/sgratzl/chartjs-chart-boxplot/runs/2155166769?check_suite_focus=true
Current Behavior
Possible Solution
make sure that all the used types are properly exported
Steps to Reproduce
see https://github.com/sgratzl/chartjs-chart-boxplot/runs/2155166769?check_suite_focus=true
Context
Environment
The text was updated successfully, but these errors were encountered: