'why the visual studio code did not give import hint when using typescript
I am using visual studio code to write a login function, this is the typescript code looks like:
import { LoginType } from "@model/enumn/LoginType";
import { WheelGlobal } from "@model/immutable/WheelGlobal";
import LocalStorage from "@utils/data/LocalStorage";
export const AuthHandler = {
pluginLogin: async () => {
let username:string = await LocalStorage.readLocalStorage(WheelGlobal.USER_NAME);
let password:string = await LocalStorage.readLocalStorage(WheelGlobal.PASSWORD);
let deviceId:string = await Device.getDeviceId();
let appId:string = await LocalStorage.readLocalStorage(WheelGlobal.REDDWARF_APP_ID_KEY);
let loginParams = {
phone: username,
password: password,
deviceId: deviceId,
app: Number(appId),
deviceType: 7,
loginType: LoginType.PHONE,
};
AuthHandler.login(loginParams);
}
}
the problem is that the visual studio code did not tell me to import the Device, there is no error tips even though I did not import the Device. why did this happen? when I remove the LocalStorage import, the visual studio code would tell me to import the LocalStorage, why the Device import did not give the hint?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
