Skip to content

Commit

Permalink
Use stripInternal
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Nov 28, 2023
1 parent 1ca33e2 commit 073b248
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/latex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ const mapNode = (n: latex.Node, runs: MathRun[]): MathRun[] | false => {
return [];
};

/**
* @internal
*/
export const parseLatex = (value: string): MathRun[][] => {
const parsed = parseMath(value);
const paragraphs: MathRun[][] = [[]];
Expand Down
6 changes: 6 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/**
* @internal
*/
export const unreachable = (_: never): never => {
throw new Error("unreachable");
};

/**
* @internal
*/
export function invariant(cond: any, message: string): asserts cond {
if (!cond) throw new Error(message);
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false
"allowUnusedLabels": false,
// "exactOptionalPropertyTypes": true,
"stripInternal": true
},
"include": ["src"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit 073b248

Please sign in to comment.