Skip to content

Commit 0f1e2a1

Browse files
committed
docs: add file header
Also: - test: clarify test
1 parent deae6c6 commit 0f1e2a1

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

tests/lib/espree.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1+
/**
2+
* @fileoverview Tests for EspreeParser.
3+
* @author Brett Zamir
4+
*/
5+
6+
//------------------------------------------------------------------------------
7+
// Requirements
8+
//------------------------------------------------------------------------------
9+
110
import assert from "assert";
211
import * as acorn from "acorn";
312
import espree from "../../lib/espree.js";
413

14+
//------------------------------------------------------------------------------
15+
// Tests
16+
//------------------------------------------------------------------------------
17+
518
describe("espree", () => {
6-
it("Throws upon `jsx_readString` when not using JSX", () => {
19+
it("Throws upon `jsx_readString` call when not using JSX", () => {
720
const espreeParserFactory = espree();
821
const AcornParser = acorn.Parser;
922
const EspreeParser = espreeParserFactory(/** @type {EspreeParser} */ (AcornParser));

tools/js-for-ts.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1+
/**
2+
* @fileoverview Tool to prepare JavaScript (+JSDoc) for TypeScript, inlining
3+
* `@local`-marked `@typedef`'s, and building a faux class for `@export`-marked
4+
* classes so the type can be exported out of a given file.
5+
* @author Brett Zamir
6+
*/
7+
8+
//------------------------------------------------------------------------------
9+
// Requirements
10+
//------------------------------------------------------------------------------
11+
112
import js2tsAssistant from "@es-joy/js2ts-assistant";
213

14+
// ----------------------------------------------------------------------------
15+
// Modify output
16+
// ----------------------------------------------------------------------------
17+
318
await js2tsAssistant({
419
customClassHandling({
520
ast, builders, superClassName

0 commit comments

Comments
 (0)