gis-common 5.1.17 → 5.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -39,7 +39,7 @@ export declare const AjaxUtil: {
39
39
  * }
40
40
  * );
41
41
  */
42
- get(url: string, options: AjaxGetOption, cb?: any): XMLHttpRequest;
42
+ get(url: string, options?: AjaxGetOption, cb?: any): XMLHttpRequest;
43
43
  /**
44
44
  * Fetch remote resource by HTTP "POST" method
45
45
  * @param {String} url - resource url
@@ -84,7 +84,7 @@ export declare const AjaxUtil: {
84
84
  * }
85
85
  * );
86
86
  */
87
- getArrayBuffer(url: string, options: AjaxGetOption, cb: Callback | AjaxGetOption): XMLHttpRequest;
87
+ getArrayBuffer(url: string, options: AjaxGetOption | Callback, cb: Callback): XMLHttpRequest;
88
88
  getImage(img: any, url: string, options: any): XMLHttpRequest;
89
89
  /**
90
90
  * Fetch resource as a JSON Object.
@@ -105,7 +105,7 @@ export declare const AjaxUtil: {
105
105
  * }
106
106
  * );
107
107
  */
108
- getJSON(url: string, options: AjaxGetOption, cb?: Callback): any;
108
+ getJSON(url: string, options?: AjaxGetOption | Callback, cb?: Callback): any;
109
109
  };
110
110
 
111
111
  export declare const ArrayUtil: {
@@ -401,7 +401,7 @@ export declare interface Coordinate {
401
401
 
402
402
  export declare type CoordinateArray = [number, number] | [number, number, number];
403
403
 
404
- export declare class {
404
+ export declare class CoordsUtil {
405
405
  private static readonly PI;
406
406
  private static readonly XPI;
407
407
  private static delta;
@@ -737,7 +737,7 @@ export declare interface GeoJSONCollection {
737
737
  export declare interface GeoJSONFeature {
738
738
  type: 'Feature';
739
739
  geometry: GeoJSONPoint | GeoJSONMultiPoint | GeoJSONLineString | GeoJSONMultiLineString | GeoJSONPolygon | GeoJSONMultiPolygon;
740
- properties?: Record<string, any>;
740
+ properties: Record<string, any>;
741
741
  }
742
742
 
743
743
  export declare interface GeoJSONLineString {
@@ -748,7 +748,7 @@ export declare interface GeoJSONLineString {
748
748
  export declare interface GeoJSONLineStringFeature {
749
749
  type: 'Feature';
750
750
  geometry: GeoJSONLineString;
751
- properties?: Record<string, any>;
751
+ properties: Record<string, any>;
752
752
  }
753
753
 
754
754
  export declare interface GeoJSONMultiLineString {
@@ -769,13 +769,13 @@ export declare interface GeoJSONMultiPolygon {
769
769
  export declare interface GeoJSONMultiPolygonFeature {
770
770
  type: 'Feature';
771
771
  geometry: GeoJSONMultiPolygon;
772
- properties?: Record<string, any>;
772
+ properties: Record<string, any>;
773
773
  }
774
774
 
775
775
  export declare interface GeoJSONMultiStringLineFeature {
776
776
  type: 'Feature';
777
777
  geometry: GeoJSONMultiLineString;
778
- properties?: Record<string, any>;
778
+ properties: Record<string, any>;
779
779
  }
780
780
 
781
781
  export declare interface GeoJSONPoint {
@@ -791,7 +791,7 @@ export declare interface GeoJSONPolygon {
791
791
  export declare interface GeoJSONPolygonFeature {
792
792
  type: 'Feature';
793
793
  geometry: GeoJSONPolygon;
794
- properties?: Record<string, any>;
794
+ properties: Record<string, any>;
795
795
  }
796
796
 
797
797
  export declare const GeoJsonUtil: {
@@ -871,7 +871,7 @@ export declare const GeoJsonUtil: {
871
871
 
872
872
  export declare type GeometryType = 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon';
873
873
 
874
- export declare class {
874
+ export declare class GeoUtil {
875
875
  static readonly toRadian: number;
876
876
  static readonly R = 6371393;
877
877
  static readonly R_EQU = 6378137;
@@ -1235,7 +1235,7 @@ export declare const ObjectUtil: {
1235
1235
  * @param args 一个或多个源对象,用于提供要复制的属性。
1236
1236
  * @returns 返回目标对象,包含所有复制的属性。
1237
1237
  */
1238
- assign<T extends Record<string, any>>(dest: Record<string, any>, ...args: any[]): Record<string, any>;
1238
+ assign<T extends Record<string, any>>(dest: Record<string, any>, ...args: any[]): T;
1239
1239
  /**
1240
1240
  * 深度合并对象,并返回合并后的对象
1241
1241
  *
@@ -1243,7 +1243,7 @@ export declare const ObjectUtil: {
1243
1243
  * @param sources 待合并的对象列表
1244
1244
  * @returns 合并后的对象
1245
1245
  */
1246
- deepAssign<T extends Record<string, any>>(target: Record<string, any>, ...sources: any[]): any;
1246
+ deepAssign<T extends Record<string, any>>(target: Record<string, any>, ...sources: any[]): T;
1247
1247
  clone<T>(obj: T): T;
1248
1248
  /**
1249
1249
  * 深拷贝一个对象到另一个对象
@@ -1252,7 +1252,7 @@ export declare const ObjectUtil: {
1252
1252
  * @param srcObj 源对象,深拷贝的来源对象
1253
1253
  * @returns 深拷贝后的目标对象
1254
1254
  */
1255
- deepClone<T extends Record<string, any>>(destObj: Record<string, any>, srcObj: T): Record<string, any>;
1255
+ deepClone<T extends Record<string, any>>(destObj: Record<string, any>, srcObj: T): T;
1256
1256
  isEqual<T>(a: T, b: T): boolean;
1257
1257
  parse(str: any): any;
1258
1258
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gis-common",
3
- "version": "5.1.17",
3
+ "version": "5.1.19",
4
4
  "author": "Guo.Yan <luv02@vip.qq.com>",
5
5
  "license": "MIT",
6
6
  "private": false,