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
|
|
13
|
-
|
|
14
|
-
/** Type guard: narrows
|
|
15
|
-
|
|
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
|
|
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
|
|
14
|
-
|
|
15
|
-
return
|
|
13
|
+
/** Type guard: narrows this to PagePreview. */
|
|
14
|
+
isPagePreview() {
|
|
15
|
+
return this.previewType === PreviewType.Page;
|
|
16
16
|
}
|
|
17
|
-
/** Type guard: narrows
|
|
18
|
-
|
|
19
|
-
return
|
|
17
|
+
/** Type guard: narrows this to RegionPreview. */
|
|
18
|
+
isRegionPreview() {
|
|
19
|
+
return this.previewType === PreviewType.Region;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.Preview = Preview;
|