That is not vanilla JavaScript, it is TypeScript. As any means consider the typed object as a plain untyped JavaScrpt object.
The as
keyword is a Type Assertion in TypeScript which tells the compiler to consider the object as another type than the type the compiler infers the object to be.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…