https://github.com/cheminfo/cheminfo-types
https://github.com/cheminfo/cheminfo-types
chemistry data hacktoberfest schema typescript
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cheminfo/cheminfo-types
- Owner: cheminfo
- License: mit
- Created: 2021-03-14T13:16:14.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-03-26T14:34:32.000Z (3 months ago)
- Last Synced: 2026-03-27T05:46:33.349Z (3 months ago)
- Topics: chemistry, data, hacktoberfest, schema, typescript
- Language: TypeScript
- Homepage: https://cheminfo.github.io/cheminfo-types/
- Size: 17.6 MB
- Stars: 2
- Watchers: 4
- Forks: 3
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cheminfo-types
[![NPM version][npm-image]][npm-url]
[![build status][ci-image]][ci-url]
[![npm download][download-image]][download-url]
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](./LICENSE)
[npm-image]: https://img.shields.io/npm/v/cheminfo-types.svg
[npm-url]: https://www.npmjs.com/package/cheminfo-types
[ci-image]: https://github.com/cheminfo/cheminfo-types/workflows/Node.js%20CI/badge.svg?branch=main
[ci-url]: https://github.com/cheminfo/cheminfo-types/actions?query=workflow%3A%22Node.js+CI%22
[download-image]: https://img.shields.io/npm/dm/cheminfo-types.svg
[download-url]: https://www.npmjs.com/package/cheminfo-types