What are ScopedVars and what are they used for?

I do not find any relevant documentation on this subject. I think it is like dashboard variables but declared inside panel code. I am not sure.

The definition of the interface is:

export interface ScopedVar<T = any> {
  text: any;
  value: T;
  [key: string]: any;

export interface ScopedVars {
  [key: string]: ScopedVar;

If the variable is the key of ScopedVars, what text of ScopedVar is for ?
How are used other keys ([key: string]: any;) of ScopedVar ?

Thank you.