basic.ts 625 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Copyright (c) 2017 molio contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author David Sehnal <david.sehnal@gmail.com>
  5. */
  6. import Column from '../../../mol-base/collections/column'
  7. export type Table<Data> = { [E in keyof Data]: Column<Data[E]> }
  8. export interface ElementSymbol extends String { '@type': 'element-symbol' }
  9. export function ElementSymbol(s: string): ElementSymbol {
  10. // TODO: optimize?
  11. return s.toUpperCase() as any;
  12. }
  13. export interface Atoms extends Table<{
  14. name: string,
  15. elementSymbol: ElementSymbol,
  16. }> { }
  17. interface Common {
  18. }
  19. export default Common