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

[TypeScript] Improve constructor declarations #8547

Closed
SergeyMaltsev opened this issue Feb 14, 2024 · 0 comments
Closed

[TypeScript] Improve constructor declarations #8547

SergeyMaltsev opened this issue Feb 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@SergeyMaltsev
Copy link
Contributor

Forum post

export class NumberDataField extends DataField {
    /**
     * Base constructor, passes arguments to [construct](https://bryntum.com/products/grid/docs/api/Core/Base#function-construct).
     * @param {object} args Usually called with a config object, but accepts any params
     */
    constructor(...args: object[]);
}

The ideal declaration is like this:

export class NumberDataField extends DataField {
    /**
     * Base constructor, passes arguments to [construct](https://bryntum.com/products/grid/docs/api/Core/Base#function-construct).
     * @param {object} args Usually called with a config object, but accepts any params
     */
    constructor(config?: Partial<NumberDataFieldConfig>);
}

This "problem" exists in almost all DataField classes, this is the "fix" I'm suggesting.

@SergeyMaltsev SergeyMaltsev added bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer labels Feb 14, 2024
@SergeyMaltsev SergeyMaltsev self-assigned this Feb 14, 2024
@SergeyMaltsev SergeyMaltsev added the resolved Fixed but not yet released (available in the nightly builds) label Feb 26, 2024
@SergeyMaltsev SergeyMaltsev added this to the 5.6.8 milestone Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

1 participant