A little confusion of TypeScript bypassing compiler check

when you encounter a problem in the process of learning TypeScript, take a look at the following code

In the section
  TypeScript  additional type checking, solutions are given to avoid compiler errors in the code. 

my confusion is, why can this method circumvent compiler type checking?

Jun.30,2022


,,[propName: string]: any,

interface SquareConfig {
  color?: string;
  width?: number;
  [propName: string]: any;
}

let squareOptions = { colour: "red", width: 100 };
let mySquare = createSquare(squareOptions);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e30898-5864d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e30898-5864d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?