From: Ardis Lu Date: Thu, 29 May 2025 04:42:03 +0000 (-0700) Subject: Tweak types X-Git-Tag: v0.1.0~5 X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=60a841ee8b335254631b87aa9ea140e3266eaec9;p=csvio Tweak types --- 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 = [];