0

Hi I am newbie in typesript and while I reading redux source code pieces I found the issue and search a lot of stuff and can not track its tail.

declare global {
  interface SymbolConstructor {
    readonly observable: symbol
  }
}

const $$observable = /* #__PURE__ */ (() =>
  (typeof Symbol === 'function' && Symbol.observable) || '@@observable')()

export default $$observable

To clarify its complexity this is the link of code:https://github.com/reduxjs/redux/blob/master/src/utils/symbol-observable.ts

juexu
  • 131
  • 2
  • 11
  • Related: https://stackoverflow.com/questions/1463867/javascript-double-dollar-sign, https://stackoverflow.com/questions/19338493/what-is-the-double-dollar-sign-used-for-in-angular – Christoph Lütjen Mar 26 '21 at 15:38

1 Answers1

2

$ and also $$ are valid variable names in javascript with no special meaning whatsoever and thus also have no special meaning in typescript.

Mirco S.
  • 2,510
  • 4
  • 13