-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
Error at build #2588
Comments
As a workaround you can set strictNullCheck to false in your tsconfig file. |
It's a big project and I like having strict rules, I'm not in favor of being less restrictive due to a dependency. For now I'll stick with the beta! Maybe allowing the type to be BaseValue<WebGLVertexArrayObject | null> would suffice. |
Feel free to submit a PR. |
It's probably a good idea to work towards enabling |
In addition to the above error, I'm also seeing the following:
It seems that "export type *" is only supported in TypeScript 5.0 and up. If we want to require that, we may want to document it somewhere. FWIW, TypeScript 5.0 is only supported in the latest version of Angular (released a couple weeks ago). Not sure about other UI frameworks off hand. |
PR fixes the first posted problem. I think the second problem I mentioned probably warrants its own issue for discussion? Let me know and I'll create one. |
You can overcome typescript 5 issue by adding skipLibCheck flag. |
It should probably be noted that the original issue above can also be overcome by adding |
I've opened a PR that will solve more than just this error. |
As one might guess, Maplibre is also being used outside of the latest version of Angular. I do not see why you would use language features that are only available in the latest and greatest for a library that is for general use? Maybe rename to mapblibre-gl-angular or something? Does the requirement to use 'skipLibCheck: true' also skip checks for all other libraries in use, just because maplibre is using the latest and greatest but not widely available future language features? Wouldn't it be nicer and more compatible if the library supports a compiler version that is in general use? As I am not a contributor, I should not complain about the hard work, but I hope someone sees the point. Or am I missing something? |
While preparing a setup to demo the problem, I think my 'error TS1383: Only named exports may use 'export type'' was caused by the fix I used to resolve the problem in the previous (< v3.1.0) version. Thanks for asking me to double-check. |
If you have a different solution to exporting the style-spec types that doesn't require typescript 5 you are more than welcome to contribute your time and effort to resolve this. |
maplibre-gl-js version: 3.0.0
Steps to Trigger Behavior
pnpm i
pnpm run build
Expected behavior: application compiles without error
Actual behavior:
I've been using version 3.0.0-pre.5 so far without encountering this error.
The text was updated successfully, but these errors were encountered: