diff --git a/js/core/index.d.ts b/js/core/index.d.ts index 0acff4bfd5b1..e50c632082a5 100644 --- a/js/core/index.d.ts +++ b/js/core/index.d.ts @@ -19,9 +19,10 @@ export type Xor> | Seal>; -export type DeepPartial = T extends object ? { +export type Scalar = undefined | null | string | String | number | Number | BigInteger | boolean | Boolean | Date | Function | Symbol | Array; +export type DeepPartial = T extends Scalar ? T : { [P in keyof T]?: DeepPartial; -} : T; +}; // Omit does not exist in TS < 3.5.1 export type Skip = Pick>; diff --git a/ts/dx.all.d.ts b/ts/dx.all.d.ts index f34ab2b915c9..8c3e3447ed99 100644 --- a/ts/dx.all.d.ts +++ b/ts/dx.all.d.ts @@ -1909,11 +1909,11 @@ declare module DevExpress.core { /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ - export type DeepPartial = T extends object - ? { + export type DeepPartial = T extends Scalar + ? T + : { [P in keyof T]?: DeepPartial; - } - : T; + }; export type DefaultOptionsRule = { device?: Device | Device[] | ((device: Device) => boolean); options: DeepPartial; @@ -1989,6 +1989,23 @@ declare module DevExpress.core { * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ interface PromiseType extends JQueryPromise {} + /** + * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. + */ + export type Scalar = + | undefined + | null + | string + | String + | number + | Number + | BigInteger + | boolean + | Boolean + | Date + | Function + | Symbol + | Array; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.