+7
-0
@@ -0,1 +1,8 @@ | ||
| ## [1.2.3](https://github.com/eik-lib/sink/compare/v1.2.2...v1.2.3) (2024-07-23) | ||
| ### Bug Fixes | ||
| * drop the generic in favor of readable, writable ([2fb4e67](https://github.com/eik-lib/sink/commit/2fb4e674182d012d36e042a278a8927bfc541fdd)) | ||
| ## [1.2.2](https://github.com/eik-lib/sink/compare/v1.2.1...v1.2.2) (2024-07-23) | ||
@@ -2,0 +9,0 @@ |
+6
-8
| /* eslint-disable no-unused-vars */ | ||
| export default class Sink { | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath Path to the file to be stored. | ||
| * @param {string} contentType The content type of the file (ex `application/javascript`). | ||
| * @returns {T | Promise<T>} | ||
| * @returns {import("node:stream").Writable | Promise<import("node:stream").Writable>} | ||
| */ | ||
@@ -14,5 +13,4 @@ write(filePath, contentType) { | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath | ||
| * @returns {T | Promise<T>} | ||
| * @returns {import("node:stream").Readable | Promise<import("node:stream").Readable>} | ||
| */ | ||
@@ -24,5 +22,5 @@ read(filePath) { | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath | ||
| * @returns {T | Promise<T>} | ||
| * @throws {Error} if the delete operation fails | ||
| * @returns {void | Promise<void>} | ||
| */ | ||
@@ -34,5 +32,5 @@ delete(filePath) { | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath | ||
| * @returns {T | Promise<T>} | ||
| * @throws {Error} if the file does not exist | ||
| * @returns {void | Promise<void>} | ||
| */ | ||
@@ -39,0 +37,0 @@ exist(filePath) { |
+1
-1
| { | ||
| "name": "@eik/sink", | ||
| "version": "1.2.2", | ||
| "version": "1.2.3", | ||
| "description": "A Sink interface", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
+10
-12
@@ -17,28 +17,26 @@ export default class Sink { | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath Path to the file to be stored. | ||
| * @param {string} contentType The content type of the file (ex `application/javascript`). | ||
| * @returns {T | Promise<T>} | ||
| * @returns {import("node:stream").Writable | Promise<import("node:stream").Writable>} | ||
| */ | ||
| write<T = unknown>(filePath: string, contentType: string): T | Promise<T>; | ||
| write(filePath: string, contentType: string): import("node:stream").Writable | Promise<import("node:stream").Writable>; | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath | ||
| * @returns {T | Promise<T>} | ||
| * @returns {import("node:stream").Readable | Promise<import("node:stream").Readable>} | ||
| */ | ||
| read<T = unknown>(filePath: string): T | Promise<T>; | ||
| read(filePath: string): import("node:stream").Readable | Promise<import("node:stream").Readable>; | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath | ||
| * @returns {T | Promise<T>} | ||
| * @throws {Error} if the delete operation fails | ||
| * @returns {void | Promise<void>} | ||
| */ | ||
| delete<T = unknown>(filePath: string): T | Promise<T>; | ||
| delete(filePath: string): void | Promise<void>; | ||
| /** | ||
| * @template [T=unknown] | ||
| * @param {string} filePath | ||
| * @returns {T | Promise<T>} | ||
| * @throws {Error} if the file does not exist | ||
| * @returns {void | Promise<void>} | ||
| */ | ||
| exist<T = unknown>(filePath: string): T | Promise<T>; | ||
| exist(filePath: string): void | Promise<void>; | ||
| get metrics(): void; | ||
| get [Symbol.toStringTag](): string; | ||
| } |
10513
5.5%107
-3.6%