Skip to content

Commit

Permalink
[alg/kpuzzle] Consolidate parser shims.
Browse files Browse the repository at this point in the history
This removes all `d.ts` files from `src`, which helps make sure there are no orphaned imports in the built types.
  • Loading branch information
lgarron committed Dec 27, 2020
1 parent bf9085d commit 6978a7d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/cubing/alg/parser/parser-shim.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/cubing/alg/parser/parser-shim.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/cubing/alg/parser/parser-shim.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Note: this file exists so that `parse` doesn't show up for autocompletion (by
// avoiding a `parser-pegjs.d.ts` file that exports `parse`.)

import { AlgJSON } from "../json";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { parse } from "./parser-pegjs";

const pegParseAlgJSON: (s: string) => AlgJSON = parse;

export { pegParseAlgJSON };
3 changes: 0 additions & 3 deletions src/cubing/kpuzzle/parser/parser-shim.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/cubing/kpuzzle/parser/parser-shim.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/cubing/kpuzzle/parser/parser-shim.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Note: this file exists so that `parse` doesn't show up for autocompletion (by
// avoiding a `parser-pegjs.d.ts` file that exports `parse`.)

import { KPuzzleDefinition } from "../definition_types";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { parse } from "./parser-pegjs";

const pegParseKPuzzleDefinition: (s: string) => KPuzzleDefinition = parse;

export { pegParseKPuzzleDefinition };

0 comments on commit 6978a7d

Please sign in to comment.