Skip to content

[Feature Request] Export AdapterConfig option #737

@JinIgarashi

Description

@JinIgarashi

Is your feature request related to a problem? Please describe.

Each TerraDraw adapter has own adapter option. For example, maplibre adapter has like

export class TerraDrawMapLibreGLAdapter<
MapType,
> extends TerraDrawExtend.TerraDrawBaseAdapter {
constructor(
config: {
map: MapType;
renderBelowLayerId?: string;
prefixId?: string;
} & TerraDrawExtend.BaseAdapterConfig,
) {

But this adapter config is not exported, so the type definition cannot be used in third party application.

Describe your proposed idea for the solution to this problem

For example, in terradraw-gl-maplibre, I had to write my own adapter config interface like below

export interface TerraDrawMapLibreGLAdapterConfig {
	renderBelowLayerId?: string;
	prefixId?: string;
}

But this way needs to maintain adapter option when new arg is added in the future.

So, if each TerraDraw adapter has exported type definition, it will be easier to maintain source code by just upgrading terradraw adapter version in package.json.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered. For example would this be possible with a custom mode or adapter?

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions