]> git.ardis.lu - csvio/commitdiff
Use consistent JSDoc typecasting formatting
authorArdis Lu <ardisglu@gmail.com>
Sun, 13 Jul 2025 05:04:31 +0000 (22:04 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sun, 13 Jul 2025 05:04:31 +0000 (22:04 -0700)
examples/ex4_1.js
examples/ex4_2.js
src/core.js
test/normalization.test.js

index 5e91bf172ab1ffa48ae0b2043399729101b6a1cd..a613f7b7257bd08b32d1c7f40315ca2211d56b53 100644 (file)
@@ -13,7 +13,7 @@ import { CSVReader, CSVWriter, CSVNormalizer, CSVDenormalizer } from '../src/ind
 
 // 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> } */
+/** @type {Array<CSVNormalizerHeader>} */
 const headers = [
   {
     name: 'index', // MUST match the input CSV column name in camelCase
index cfbe256ecdce0d97e736b3a74b8031cbf62f6d25..499d85d39188af0fcf3a211c4897c3f75fb4993f 100644 (file)
@@ -8,7 +8,7 @@ import { CSVReader, CSVWriter, CSVNormalizer, CSVDenormalizer, CSVTransformer }
 /** @import { CSVNormalizerHeader } from '../src/normalization.js'; */
 
 // A minimal declaration to tell `CSVNormalizer` to trim empty rows and columns but otherwise don't touch the data
-/** @type { Array<CSVNormalizerHeader> } */
+/** @type {Array<CSVNormalizerHeader>} */
 const headers = [
   { name: 'columnA' },
   { name: 'columnB' },
index 7d982915fb279ee451e2d29f7a22c1dd9984966e..cfd4114680527086b0273b741f7cee2fe4f1de7c 100644 (file)
@@ -43,7 +43,7 @@ export function parsePathLike(path) {
  * @returns {ReadableStream<Uint8Array<ArrayBufferLike>>}
  */
 export function createFileStream(path) {
-  /** @type FileHandle */
+  /** @type {FileHandle} */
   let handle;
   let position = 0;
 
@@ -509,7 +509,7 @@ export class CSVWriter extends WritableStream {
       rows: 0,
       done: false
     };
-    /** @type FileHandle */
+    /** @type {FileHandle} */
     let handle;
     super({
       async start() {
index fb4805f1a583f8e7b4256e61a2d4404a0aae491c..620b4cf8106c9701dd5a5658c1d8ed2a94fe2412 100644 (file)
@@ -492,7 +492,7 @@ suite('CSVDenormalizer', { concurrency: true }, () => {
 
 suite('CSVNormalizer and CSVDenormalizer end-to-end', { concurrency: true }, () => {
   test('can normalize', { concurrency: true }, async () => {
-    /** @type { Array<CSVNormalizerHeader> } */
+    /** @type {Array<CSVNormalizerHeader>} */
     const headers = [
       { name: 'stringCol', displayName: 'String Column', type: 'string', defaultValue: 'N/A' },
       { name: 'numberCol', displayName: 'Number Column', type: 'number' },
@@ -510,7 +510,7 @@ suite('CSVNormalizer and CSVDenormalizer end-to-end', { concurrency: true }, ()
       ]));
   });
   test('can normalize with transformation', { concurrency: true }, async () => {
-    /** @type { Array<CSVNormalizerHeader> } */
+    /** @type {Array<CSVNormalizerHeader>} */
     const headers = [
       { name: 'columnA' },
       { name: 'columnB' }
This page took 0.03972 seconds and 4 git commands to generate.