[typescript] how to make a type globally available

I define a data interface in the view in the project using the following syntax:

interface IUserInfo extends Immutable.Map<string, any> {
    
}

but the error: Cannot find namespace "Immutable" , I have downloaded @ types/redux-immutable .

I already know that there is a way to define this type in the xxx.d.ts file, and then configure typeRoot in tsconfig.json . Is there any other way to make the Immutable type globally available?

Mar.23,2021

Immutable belongs to the immutable package, which has nothing to do with redux-immutable. Redux-immutable simply bridges redux and immutable. Do you install immutable ? immutable has a

Previous: About the map of Mini Program

Next: How layui's Calendar puts Monday in the first place

Menu