]> git.ardis.lu - csvio/commitdiff
Tweak types
authorArdis Lu <ardisglu@gmail.com>
Thu, 29 May 2025 04:42:03 +0000 (21:42 -0700)
committerArdis Lu <ardisglu@gmail.com>
Thu, 29 May 2025 04:42:03 +0000 (21:42 -0700)
examples/ex4_1.js
src/core.js

index 0a55f1280e0f8d5901d26a91bc1b19454606ebc7..5e91bf172ab1ffa48ae0b2043399729101b6a1cd 100644 (file)
@@ -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<CSVNormalizerHeader> } */
 const headers = [
   {
     name: 'index', // MUST match the input CSV column name in camelCase
index 9749f6e118b95cfbf3d99c5df296027222f83119..6c59a1a9b65e25c89233df0b35ff37f39b640d18 100644 (file)
@@ -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<string>
  */
 export class CSVReader extends ReadableStream {
   #row = [];
This page took 0.051311 seconds and 4 git commands to generate.