You can declare variables with
letvarconst
let x = 10;
var y = 20;
const z = 2145325;If a interface has a field that is not required, you can add a ? right in front of it
interface Useless
{
possibleNumber? : 10 | 20;
}speaking of that |, it shows that possibleNumber can either attain the value of 10 or 20. Refer to Union and Intersection Type Operators
interface Judgement
{
formats?: '12h' | '24h';
}