Unplanned
Last Updated: 05 Mar 2021 13:22 by ADMIN
Lou
Created on: 05 Mar 2021 04:41
Category: Kendo UI for jQuery
Type: Feature Request
0
Modify kendo culture() function in kendo.all.d.ts making it an interface.

Hi,

We are using kendo (version 2020.2.617) from typescript. The current of the culture() function definition in kendo.all.d.ts looks like this:


declare namespace kendo {
    function culture(): {
        name: string;
        calendar: {
            AM: string[];
            PM: string[];
            "/": string;
            ":": string;
            days: {
                names: string[];
                namesAbbr: string[];
                namesShort: string[];
            };
            months: {
                names: string[];
                namesAbbr: string[];
            };
            patterns: {
                D: string;
                F: string;
                G: string;
                M: string;
                T: string;
                Y: string;
                d: string;
                g: string;
                m: string;
                s: string;
                t: string;
                u: string;
                y: string;
            };
            firstDay: number;
            twoDigitYearMax: number;
        };
        calendars: {
            standard: {
                AM: string[];
                PM: string[];
                "/": string;
                ":": string;
                days: {
                    names: string[];
                    namesAbbr: string[];
                    namesShort: string[];
                };
                months: {
                    names: string[];
                    namesAbbr: string[];
                };
                patterns: {
                    D: string;
                    F: string;
                    G: string;
                    M: string;
                    T: string;
                    Y: string;
                    d: string;
                    g: string;
                    m: string;
                    s: string;
                    t: string;
                    u: string;
                    y: string;
                };
                firstDay: string;
                twoDigitYearMax: number;
            };
        };
        numberFormat: {
            currency: {
                decimals: number;
                ",": string;
                ".": string;
                groupSize: number[];
                pattern: string[];
                symbol: string;
            };
            decimals: number;
            ",": string;
            ".": string;
            groupSize: number[];
            pattern: string[];
            percent: {
                decimals: number;
                ",": string;
                ".": string;
                groupSize: number[];
                pattern: string[];
                symbol: string;
            };
        };
    };

It would be desirable if this was declared as an interface so client code could use the interface type and assign the culture to a typed variable, eg:

let currentCulture: IKendoCulture = kendo.culture( );

Thanks and regards,

Lou

1 comment
ADMIN
Aleksandar
Posted on: 05 Mar 2021 13:22

Hi Lou,

Thank you for the suggestion. I have converted this thread to a Feature Request and we will monitor the community interest and consider this update for a future release.

Also, as the typing definitions are part of the Kendo UI Core repository, this enables users to contribute to the repository by following the Contribution Guide. That being said, if you have already made changes to the file locally for adding the missing definitions, you could also open a Pull Request in the Kendo UI Core repository. We will then be able to review the changes, and if everything works correctly, we will merge the changes in the code base.

In case you have any additional questions, please do not hesitate to contact us. 

Regards,
Aleksandar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.