loci.ts 556 B

1234567891011121314151617
  1. /**
  2. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. */
  6. import { Element } from './structure'
  7. import { Bond } from './structure/structure/unit/bonds'
  8. /** A Loci that includes every loci */
  9. export const EveryLoci = { kind: 'every-loci' as 'every-loci' }
  10. export type EveryLoci = typeof EveryLoci
  11. export function isEveryLoci(x: any): x is EveryLoci {
  12. return !!x && x.kind === 'every-loci';
  13. }
  14. export type Loci = Element.Loci | Bond.Loci | EveryLoci