[Doc]GeoJsonLayer: TypeScript example cannot be compiled
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- documentation
Research direction
Open the GeoJsonLayer API documentation at the linked URL and inspect the TypeScript example containing the getLineColor accessor. Reproduce the reported TypeScript 5.7.3 error, then update the example so it compiles while preserving its intended behavior. Done means the documented example no longer produces the reported type error.
Written by the indexing model from the issue text.
Description
Link
https://deck.gl/docs/api-reference/layers/geojson-layer
Description
The line
getLineColor: (f: Feature<Geometry, PropertiesType>) => { … }
in the TypeScript example cannot be compiled. The error the compiler issues is:
Type '(f: Feature<Geometry, PropertiesType>) => number[] | undefined' is not assignable to type 'Accessor<Feature<Geometry, PropertiesType>, Color> | undefined'.
Type '(f: Feature<Geometry, PropertiesType>) => number[] | undefined' is not assignable to type 'AccessorFunction<Feature<Geometry, PropertiesType>, Color>'.
Type 'number[] | undefined' is not assignable to type 'Color'.
Type 'undefined' is not assignable to type 'Color'.
(using typescript 5.7.3)
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from visgl/deck.gl
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100