代码之家  ›  专栏  ›  技术社区  ›  kevin

如何删除intelligense中出现的材质ui类型?

  •  0
  • kevin  · 技术社区  · 3 年前

    我正在努力清理我对material ui的使用,并在这样做的过程中,从我没有使用的intellisense中删除打字混乱。如何将mui配置更新为 省略 我不想直接与之互动的风格?


    作为下图中的一个例子,我对以下风格不感兴趣 getContrastText , tonalOffset ,等等。防止每次配置样式时出现。

    enter image description here

    如何从选择中删除它们?

    我的电流 theme.d.ts 模块扩充脚本:

    import "@mui/material";
    
    declare module "@mui/material/styles" {
      // allow configuration using `createTheme`
      interface TypeText {
        light: string;
        inverse: {
          primary: string;
          secondary: string;
        };
      }
      interface PaletteOptions {
        text?: {
          light: string;
          inverse: {
            primary: string;
            secondary: string;
          };
        };
      }
      interface Palette {
        background: {
          dark: string;
        };
        text: {
          light: string;
          inverse: {
            primary: string;
            secondary: string;
          };
        };
      }
    }
    
    0 回复  |  直到 3 年前
    推荐文章