type-declaration
Require or forbid type in variable declarations
INFO
☑️ The predefined configuration "mslint:recommended" enables this rule.
Rule details
This rule imposes the presence or absence of the type in the variable declaration.
Settings
typecan beExpliciteto impose the presence of the type orImpliciteto impose the absence of the type. DefaultExplicite.
Example of incorrect code for this rule:
maniascript
// { "type" = "Explicite" }
declare A = 0;
declare B for This = 0;
// { "type" = "Implicite" }
declare Integer A;
declare Integer B = 0;
declare Integer C for This;
declare Integer D for This = 0;Example of correct code for this rule:
maniascript
// { "type" = "Explicite" }
declare Integer A;
declare Integer B = 0;
declare Integer C for This;
declare Integer D for This = 0;
let E = 0;
// { "type" = "Implicite" }
declare A = 0;
declare B for This = 0;
let C = 0;