Skip to content

Commit

Permalink
fix: read should return ReadFile
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Jul 23, 2024
1 parent 0f4fe8f commit 519fdf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ export default class Sink {
/**
* @param {string} filePath Path to the file to be stored.
* @param {string} contentType The content type of the file (ex `application/javascript`).
* @returns {import("node:stream").Writable | Promise<import("node:stream").Writable>}
* @returns {Promise<import("node:stream").Writable>}
*/
write(filePath, contentType) {
throw new Error('.write method is not implemented');
}

/**
* @param {string} filePath
* @returns {import("node:stream").Readable | Promise<import("node:stream").Readable>}
* @returns {Promise<import("@eik/common").ReadFile>}
*/
read(filePath) {
throw new Error('.read method is not implemented');
Expand All @@ -20,7 +20,7 @@ export default class Sink {
/**
* @param {string} filePath
* @throws {Error} if the delete operation fails
* @returns {void | Promise<void>}
* @returns {Promise<void>}
*/
delete(filePath) {
throw new Error('.delete method is not implemented');
Expand All @@ -29,7 +29,7 @@ export default class Sink {
/**
* @param {string} filePath
* @throws {Error} if the file does not exist
* @returns {void | Promise<void>}
* @returns {Promise<void>}
*/
exist(filePath) {
throw new Error('.exist method is not implemented');
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"homepage": "https://github.com/eik-lib/sink#readme",
"devDependencies": {
"@babel/eslint-parser": "7.24.7",
"@eik/common": "3.0.1",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"eslint": "9.1.1",
Expand Down

0 comments on commit 519fdf4

Please sign in to comment.