wuzekang / antd-theme

Provide runtime dynamic theme for ant design.
https://wuzekang.github.io/antd-theme
55 stars 14 forks source link

Problem with TypeScript compiling with "noImplicitAny": true #11

Open donwojtallo opened 3 years ago

donwojtallo commented 3 years ago

When running my project with "noImplicitAny": true I receive this error:

TypeScript error in C:/**/node_modules/antd-theme/lib/index.tsx(8,8):
Could not find a declaration file for module './runtime'. 'C:/**/node_modules/antd-theme/lib/runtime.js' implicitly has an 'any' type.  TS7016

     6 | import {
     7 |   tree, contexts, functionRegistry
  >  8 | } from './runtime';
       |        ^
     9 | 
    10 | type ThemeVariables = Record<string, any>;
    11 | 

This is because there are missing types for runtime.js. After fixing this I receive more related errors coming from index.tsx.

Edit: forgot to mention - this happens when trying to import anything from "antd-theme".