我似乎无法将MSAL库正确导入到我的打字稿代码中.我正在使用带有react-typescript脚本的create-react-app 搭建的简单打字稿/反应项目中使用MSAL for JS库(应该有打字).我是打字稿的新手,不知道我是否遗漏了一些明显的东西,或者当它与打字稿项目一起使用时,是否存在MSAL包的问题.
npm install --save msal.import {Msal} from 'msal';Could not find a declaration file for module 'msal'. '<path>/node_modules/msal/out/msal.js' implicitly has an 'any' type.npm install --save-dev @types/msal,但它不存在.let Msal = require('Msal');,但是得到一个错误,即Msal.UserAgentApplication不是构造函数.import { observable, action, computed } from 'mobx';
import * as Msal from 'msal'; // <-- This line gives the error
class ExampleMsal{
@observable
private …Run Code Online (Sandbox Code Playgroud)