Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build is failing with mapbox-gl #1267

Open
ImVk8686 opened this issue Aug 1, 2024 · 3 comments
Open

Build is failing with mapbox-gl #1267

ImVk8686 opened this issue Aug 1, 2024 · 3 comments
Labels
types Issues related to the TypeScript typings

Comments

@ImVk8686
Copy link

ImVk8686 commented Aug 1, 2024

mapbox-gl version: 2.14.1
mapbox-gl-draw version:1.4.1

Steps to Trigger Behavior

1.Tried creating build and getting this error
2.
3.

Expected Behavior

Earlier there was no problem, build was creating successfully

Actual Behavior

Screenshot from 2024-08-01 11-28-10

@stepankuzmin stepankuzmin added the types Issues related to the TypeScript typings label Aug 1, 2024
@ImVk8686
Copy link
Author

ImVk8686 commented Aug 2, 2024

Hey @stepankuzmin any idea on the issue i mentioned

@stepankuzmin
Copy link
Contributor

Hey @ImVk8686,

This is related to the first-class TypeScript support in GL JS. This shouldn't affect the runtime, and you should be safe to suppress these errors. We plan to migrate GL Draw to TypeScript eventually #1265

@simon-milleto
Copy link

simon-milleto commented Oct 10, 2024

Hey @ImVk8686, I fixed it with, not the best but at least typescript do not complain

// Weird hack to make mapbox-gl types work with mapbox-gl-draw
declare module 'mapbox-gl' {
  export type MapEvent = MapMouseEvent;
  export type CircleLayerSpecification = CircleLayer;
  export type FillLayerSpecification = FillLayer;
  export type LineLayerSpecification = LineLayer;

  export type ControlPosition = any;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Issues related to the TypeScript typings
Projects
None yet
Development

No branches or pull requests

3 participants