From 2a38998425fc00b84388977b8cbd3ae7f7d5fd99 Mon Sep 17 00:00:00 2001 From: rzmk <30333942+rzmk@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:51:07 -0400 Subject: [PATCH] docs: show types in WASM examples --- czv-wasm/README.md | 4 ++-- czv-wasm/examples/node-demo/sample.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/czv-wasm/README.md b/czv-wasm/README.md index 4373f96..a09c422 100644 --- a/czv-wasm/README.md +++ b/czv-wasm/README.md @@ -17,7 +17,7 @@ bun install czv Or use `npm`, `pnpm`, or `yarn` instead of `bun`. -```js +```ts import init, * as czv from "czv"; // Must run `await init()` or `initSync()` first for web use await init(); @@ -27,7 +27,7 @@ apple,2.50 banana,3.00 strawberry,1.50`; -const output = czv.rowCount({ +const output: number = czv.rowCount({ file_data: data, include_header_row: true, }); diff --git a/czv-wasm/examples/node-demo/sample.ts b/czv-wasm/examples/node-demo/sample.ts index d06d132..f969962 100644 --- a/czv-wasm/examples/node-demo/sample.ts +++ b/czv-wasm/examples/node-demo/sample.ts @@ -7,6 +7,6 @@ banana,3.00 strawberry,1.50`, }; -const output = czv.rowCount(options); +const output: number = czv.rowCount(options); console.log(output); // 4