Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Jan 18, 2024
1 parent 0b2dece commit 76d9214
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ async function fetchStacDatasetById(

// CMR STAC returns datetimes with `null` as the last value to indicate ongoing data.
const lastDatetime = domain[domain.length - 1] || new Date().toISOString();

// CMR STAC misses the dashboard specific attributes, shim these values
return {
...commonTimeseriesParams,
isPeriodic: true,
timeDensity: time_density ?? TimeDensity.DAY,
domain: [domainStart, lastDatetime]
};
} else {
Expand Down
8 changes: 6 additions & 2 deletions parcel-resolver-veda/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ declare module 'veda' {
layerId: string;
}


export enum TimeDensity {
YEAR = 'year',
MONTH = 'month',
DAY = 'day'
}
export interface DatasetLayer extends DatasetLayerCommonProps {
id: string;
stacCol: string;
Expand All @@ -74,7 +78,7 @@ declare module 'veda' {
from: string;
to: string;
},
time_density?: 'day' | 'month' | 'year';
time_density?: TimeDensity;
}
// A normalized compare layer is the result after the compare definition is
// resolved from DatasetLayerCompareSTAC or DatasetLayerCompareInternal. The
Expand Down

0 comments on commit 76d9214

Please sign in to comment.