ropegeo-common 1.2.4 → 1.2.5

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.
@@ -9,9 +9,9 @@ export declare enum PreviewType {
9
9
  */
10
10
  export declare abstract class Preview {
11
11
  abstract readonly previewType: PreviewType;
12
- /** Type guard: narrows Preview to PagePreview. */
13
- static isPagePreview(value: Preview): value is PagePreview;
14
- /** Type guard: narrows Preview to RegionPreview. */
15
- static isRegionPreview(value: Preview): value is RegionPreview;
12
+ /** Type guard: narrows this to PagePreview. */
13
+ isPagePreview(): this is PagePreview;
14
+ /** Type guard: narrows this to RegionPreview. */
15
+ isRegionPreview(): this is RegionPreview;
16
16
  }
17
17
  //# sourceMappingURL=preview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/types/previews/preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,oBAAY,WAAW;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CACpB;AAED;;GAEG;AACH,8BAAsB,OAAO;IACzB,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAE3C,kDAAkD;IAClD,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW;IAI1D,oDAAoD;IACpD,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa;CAGjE"}
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/types/previews/preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,oBAAY,WAAW;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CACpB;AAED;;GAEG;AACH,8BAAsB,OAAO;IACzB,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAE3C,+CAA+C;IAC/C,aAAa,IAAI,IAAI,IAAI,WAAW;IAIpC,iDAAiD;IACjD,eAAe,IAAI,IAAI,IAAI,aAAa;CAG3C"}
@@ -10,13 +10,13 @@ var PreviewType;
10
10
  * Base type for previews (e.g. page or region).
11
11
  */
12
12
  class Preview {
13
- /** Type guard: narrows Preview to PagePreview. */
14
- static isPagePreview(value) {
15
- return value.previewType === PreviewType.Page;
13
+ /** Type guard: narrows this to PagePreview. */
14
+ isPagePreview() {
15
+ return this.previewType === PreviewType.Page;
16
16
  }
17
- /** Type guard: narrows Preview to RegionPreview. */
18
- static isRegionPreview(value) {
19
- return value.previewType === PreviewType.Region;
17
+ /** Type guard: narrows this to RegionPreview. */
18
+ isRegionPreview() {
19
+ return this.previewType === PreviewType.Region;
20
20
  }
21
21
  }
22
22
  exports.Preview = Preview;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ropegeo-common",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Shared types and utilities for RopeGeo and WebScraper",
5
5
  "license": "ISC",
6
6
  "repository": {