[atom] mark MarkerLayer.getRole's return as potentially undefined

This commit is contained in:
GlenCFL
2018-05-21 05:29:19 -04:00
parent 2a4b24f0d0
commit 12bfa24567
2 changed files with 3 additions and 2 deletions

View File

@@ -1327,7 +1327,8 @@ function testMarkerLayer() {
markers = markerLayer.findMarkers({ containsRange: [[0, 0], pos] });
markers = markerLayer.findMarkers({ containsRange: [[0, 0], [0, 0]] });
str = markerLayer.getRole();
const role = markerLayer.getRole();
if (role) str = role;
// Marker creation
marker = markerLayer.markRange(range);

View File

@@ -1005,7 +1005,7 @@ export interface MarkerLayer {
findMarkers(params: FindMarkerOptions): Marker[];
/** Get the role of the marker layer e.g. "atom.selection". */
getRole(): string;
getRole(): string | undefined;
// Marker Creation
/** Create a marker with the given range. */