From 60a841ee8b335254631b87aa9ea140e3266eaec9 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Wed, 28 May 2025 21:42:03 -0700 Subject: [PATCH] Tweak types --- examples/ex4_1.js | 2 ++ src/core.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/ex4_1.js b/examples/ex4_1.js index 0a55f12..5e91bf1 100644 --- a/examples/ex4_1.js +++ b/examples/ex4_1.js @@ -9,9 +9,11 @@ // `CSVDenormalizer` converts the data stream back into a CSV row. import { CSVReader, CSVWriter, CSVNormalizer, CSVDenormalizer } from '../src/index.js'; +/** @import { CSVNormalizerHeader } from '../src/normalization.js'; */ // The order of items in `headers` is significant, it determines the order of the output CSV columns. // If an input column is not provided in `headers`, the column is removed from the output CSV. +/** @type { Array } */ const headers = [ { name: 'index', // MUST match the input CSV column name in camelCase diff --git a/src/core.js b/src/core.js index 9749f6e..6c59a1a 100644 --- a/src/core.js +++ b/src/core.js @@ -87,7 +87,7 @@ export function createFileStream(path) { * A simple streaming parser for CSV files. * * Each chunk is one row of the CSV file, in the form of a string that may be deserialized using `JSON.parse()`. - * @extends ReadableStream + * @extends ReadableStream */ export class CSVReader extends ReadableStream { #row = []; -- 2.47.3