diff --git a/types/amap-js-api/type-util.d.ts b/types/amap-js-api/type-util.d.ts index 1ced3d69c1..5edb14c615 100644 --- a/types/amap-js-api/type-util.d.ts +++ b/types/amap-js-api/type-util.d.ts @@ -1,12 +1,12 @@ -type Omit = { - [K in Exclude]: T[K] -}; +declare namespace AMap { + type Omit = { + [K in Exclude]: T[K] + }; -type OptionalKey = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; -// type OmitUndefined = Omit; -// type PickUndefined = Omit>; + type OptionalKey = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; -type Merge = - { [K in Exclude>]-?: O[K]; } & - { [K in Extract, OptionalKey>]?: O[K]; } & - T; + type Merge = + { [K in Exclude>]-?: O[K]; } & + { [K in Extract, OptionalKey>]?: O[K]; } & + T; +}