symbols.js.flow 870 B

1234567891011121314151617181920
  1. // @flow strict
  2. // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator
  3. // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
  4. export const SYMBOL_ITERATOR: string =
  5. typeof Symbol === 'function' && Symbol.iterator != null
  6. ? Symbol.iterator
  7. : '@@iterator';
  8. // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator
  9. // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
  10. export const SYMBOL_ASYNC_ITERATOR: string =
  11. typeof Symbol === 'function' && Symbol.asyncIterator != null
  12. ? Symbol.asyncIterator
  13. : '@@asyncIterator';
  14. // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
  15. export const SYMBOL_TO_STRING_TAG: string =
  16. typeof Symbol === 'function' && Symbol.toStringTag != null
  17. ? Symbol.toStringTag
  18. : '@@toStringTag';