When linting my code, a TS warning is triggered regarding the definition of InternalStateType
[line 8] export type InternalStateType = {
[key: string]: any,
appName: string,
darkMode: boolean,
defaultLang: string,
topnavTitle: string,
messagePanelOpen: boolean,
sidenavOpen: boolean,
sidenavMode: string,
sidenavCollapse: boolean,
pageFullscreen: boolean,
pageFooter: boolean,
initial: boolean,
};
The InternalStateType
is utilized in the App service
/**
* App service
*/
@Injectable()
export class AppService {
// Set your states default value.
private state: InternalStateType = {
appName: 'MyApp',
darkMode: false,
defaultLang: 'en',
topnavTitle: 'MyApp',
messagePanelOpen: false,
sidenavOpen: false,
sidenavMode: 'over',
sidenavCollapse: true,
pageFullscreen: false,
pageFooter: false,
initial: false,
};
Does this suggest that it would be more beneficial to replace:
export type InternalStateType = {
with:
export interface InternalStateType {