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

headlamp-plugin: "strict: true" in compilerOptions and types issue with react and mui #2317

Open
illume opened this issue Sep 10, 2024 · 1 comment
Labels
bug Something isn't working headlamp-plugin Related to the headlamp-plugin NPM package. plugins types TypeScript related typing issues.

Comments

@illume
Copy link
Collaborator

illume commented Sep 10, 2024

We should look into compilerOptions and strict: true and the issues reported against react and mui.

In my headlamp plugin, I like to use "strict": true in the compilerOptions. This option is not included in the plugins-tsconfig.json. With strict there are certain warnings:

import React from 'react'; // -> Could not find a declaration file for module 'react'.
import { Box, Stack, Tooltip } from '@mui/material'; // -> Could not find a declaration file for module '@mui/material'.

The warnings indicate that these types are not known for the compiler. I am using Visual Code. I know it is not a big deal, but maybe this can be improved? It would make working with React and MUI in the plugin code a bit more pleasant.

@illume illume added bug Something isn't working plugins headlamp-plugin Related to the headlamp-plugin NPM package. types TypeScript related typing issues. labels Sep 10, 2024
@mgalesloot
Copy link

In headlamp-plugin v0.10 react methods are properly supported.
For MUI we still have TS7016: Could not find a declaration file for module '@mui/material'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working headlamp-plugin Related to the headlamp-plugin NPM package. plugins types TypeScript related typing issues.
Projects
Development

No branches or pull requests

2 participants