Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mf-parser): package.json exposes only main #247

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/mf-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "3.2.7",
"description": "Parse a molecular formula",
"main": "lib/src/index.js",
"module": "src/index.js",
"files": [
"src",
"lib"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ export * from './MF';
export * from './parseToHtml.js';

// types
export { IsotopesInfo } from './util/getIsotopesInfo.types';
export {
export type { AtomsMap } from './util/partToAtoms.types';
export type { IsotopesInfo } from './util/getIsotopesInfo.types';
export type {
PartInfo,
PartInfoWithParts,
GetInfoOptions,
Expand Down
4 changes: 3 additions & 1 deletion packages/mf-parser/src/parseToHtml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { parse, toDisplay, toHtml } from './index.js';
import { parse } from './parse.js';
import { toDisplay } from './util/toDisplay.js';
import { toHtml } from './util/toHtml.js';

/**
* Parse a molecular formula and converts it to an HTML code
Expand Down
2 changes: 1 addition & 1 deletion packages/mf-parser/src/util/getInfo.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AtomsMap } from './partToAtoms';
import type { AtomsMap } from './partToAtoms.types';

type ImpossibleCustomNames =
| 'mass'
Expand Down
2 changes: 1 addition & 1 deletion packages/mf-parser/src/util/partToAtoms.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Kind } from '../Kind.js';

/** @typedef {Record<string, number>} AtomsMap */
/** @typedef {import('./partToAtoms.types').AtomsMap} AtomsMap */

/**
* Convert a MF part to a map of atoms
Expand Down
1 change: 1 addition & 0 deletions packages/mf-parser/src/util/partToAtoms.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type AtomsMap = Record<string, number>;
Loading