Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

Closes #9851

Background

The sizeBasis property was added in #9736 with a default value of 'height' but incorrectly marked as required in the TypeScript type definition, causing type errors when the property is omitted:

// This should work but throws: Property 'sizeBasis' is missing in type
new IconLayer({
  id: 'icons',
  data: [],
  getPosition: d => d.coordinates,
  getIcon: d => 'marker'
});

Change List

  • Mark sizeBasis as optional in _IconLayerProps<DataT> type definition to align with its default value and documentation

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.88/linux64/chrome-linux64.zip
    • Triggering command: /usr/local/bin/node /usr/local/bin/node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug] Unnecessarily required properties: sizeBasis</issue_title>
<issue_description>### Description

#9736

The sizeBasis property was newly added in the above PR, but according to the documentation committed alongside it, this property is optional.

Actually this property is required in the type definition, resulting in a type error as shown in the attached image.

Image

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CARTO
  • ArcGIS

Expected Behavior

No response

Steps to Reproduce

When using IconLayer in TypeScript without the sizeBasis property.

Environment

  • Framework version: deck.gl@9.2.2
  • Browser: -
  • OS: -

Logs

No response</issue_description>

<agent_instructions>Please mark the sizeBasis prop as optional in the IconLayer</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Note

Marks IconLayer prop sizeBasis as optional to align with defaults and prevent TypeScript errors when omitted.

Written by Cursor Bugbot for commit 1ae1c50. This will update automatically on new commits. Configure here.

Co-authored-by: chrisgervang <2461547+chrisgervang@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix type error requiring sizeBasis property Fix: Make sizeBasis optional in IconLayer type definition Nov 25, 2025
Copilot AI requested a review from chrisgervang November 25, 2025 16:05
Copilot finished work on behalf of chrisgervang November 25, 2025 16:05
@chrisgervang chrisgervang marked this pull request as ready for review November 25, 2025 16:27
@coveralls
Copy link

Coverage Status

coverage: 91.144%. remained the same
when pulling 1ae1c50 on copilot/fix-size-basis-type-error
into f713242 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Unnecessarily required properties: sizeBasis [Bug] TerrainLayer zooming, TerrainExtension draping

4 participants