cheminfo-types
TypeScript icon, indicating that this package has built-in type declarations

1.7.3 • Public • Published

cheminfo-types

NPM version build status npm download

Types for cheminfo packages and cheminfo data schema.

Key principles:

  • One type should correspond to one React component
  • The schema should not be so complicated that it becomes unusable
  • Use @tjs-examples to give examples that will show in the JSON schema and documentation

Installation

$ npm i cheminfo-types

Usage

See example
import type { MeasurementXY } from 'cheminfo-types';

const measurements: MeasurementXY[] = [];
const xAxis = {
  label: 'time',
  units: 's',
  isDependent: false,
  data: [1, 2, 3],
};
const yAxis = {
  label: 'current',
  units: 'mA',
  isDependent: true,
  data: [0.1, 8, 13],
};
const firstMeasurement: MeasurementXY = {
  title: 'Current Monitoring',
  variables: { x: xAxis, y: yAxis },
};
measurements.push(firstMeasurement);

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i cheminfo-types

Weekly Downloads

20,186

Version

1.7.3

License

MIT

Unpacked Size

14.3 kB

Total Files

5

Last publish

Collaborators

  • cheminfo-bot