Skip to content

Commit

Permalink
docs: add file header
Browse files Browse the repository at this point in the history
Also:
- test: clarify test
  • Loading branch information
brettz9 committed May 4, 2022
1 parent deae6c6 commit 0f1e2a1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/lib/espree.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
/**
* @fileoverview Tests for EspreeParser.
* @author Brett Zamir
*/

//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------

import assert from "assert";
import * as acorn from "acorn";
import espree from "../../lib/espree.js";

//------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------

describe("espree", () => {
it("Throws upon `jsx_readString` when not using JSX", () => {
it("Throws upon `jsx_readString` call when not using JSX", () => {
const espreeParserFactory = espree();
const AcornParser = acorn.Parser;
const EspreeParser = espreeParserFactory(/** @type {EspreeParser} */ (AcornParser));
Expand Down
15 changes: 15 additions & 0 deletions tools/js-for-ts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
/**
* @fileoverview Tool to prepare JavaScript (+JSDoc) for TypeScript, inlining
* `@local`-marked `@typedef`'s, and building a faux class for `@export`-marked
* classes so the type can be exported out of a given file.
* @author Brett Zamir
*/

//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------

import js2tsAssistant from "@es-joy/js2ts-assistant";

// ----------------------------------------------------------------------------
// Modify output
// ----------------------------------------------------------------------------

await js2tsAssistant({
customClassHandling({
ast, builders, superClassName
Expand Down

0 comments on commit 0f1e2a1

Please sign in to comment.