However, obviously not every library can get this treatment. If you are using Xiaoku and the official documentation does not say how to install the type declaration, you can only do it yourself.
In the error message, there is a sentence like this:
add a new declaration (.) file containing `declare module '@koumoul/vjsf/lib/VJsf';
What does this mean? According to the documentation, you only need to write an empty one in TypeScript's . filedeclare module
, you can treat the environment package asanyType introduction, and at the same time, implicit any error will not be triggered. This operation is calledShorthand ambient modules, meaning "Quickly introduce environment packages」: