Skip to content

Improve TS typing around view states #1010

@kylebarron

Description

@kylebarron

lonboard/src/index.tsx

Lines 103 to 104 in 6677d34

const [initialViewState, setViewState] =
useViewStateDebounced<MapViewState>("view_state");

lonboard/src/index.tsx

Lines 199 to 204 in 6677d34

// This condition is necessary to confirm that the viewState is
// of type MapViewState.
if ("latitude" in viewState) {
// TODO: ensure all view state types get updated on the JS side
setViewState(viewState);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions