Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jolevesq committed Nov 13, 2024
1 parent a2a2060 commit 85317c2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function JSONExportButton({ rows, features, layerPath }: JSONExportButtonProps):
* Helper function to serialize a json geometry to pass to the worker
*
* @param {Geometry} geometry - The geometry
* @returns {TypeJsonObject} The serialize geometry json
* @returns {TypeJsonObject} The serialized geometry json
*/
const serializeGeometry = (geometry: Geometry): TypeJsonObject => {
let builtGeometry = {};
Expand Down Expand Up @@ -109,6 +109,10 @@ function JSONExportButton({ rows, features, layerPath }: JSONExportButtonProps):
* @returns {Promise<string>} A promise that resolves to the JSON string to be exported.
*/
const getJson = useCallback(
// The function* is crucial here because this is a generator function, specifically an async generator function.
// - The * (asterisk) indicates that this is a generator function that can yield multiple values over time
// - async function* is the syntax for declaring an async generator function
// - The combination allows you to use both await and yield in the function body
// eslint-disable-next-line func-names
async function* (fetchGeometriesDuringProcess: boolean): AsyncGenerator<string> {
// create a set with the geoviewID available for download and filteres the features
Expand Down

0 comments on commit 85317c2

Please sign in to comment.