From 1baac7fef7174f4d7c436624f0c7b75f23d74deb Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Mon, 22 Aug 2022 15:23:18 +0800 Subject: [PATCH] fix: make update note field optional --- nodejs/package.json | 2 +- nodejs/src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nodejs/package.json b/nodejs/package.json index 946c850..e1c0592 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@hackmd/api", - "version": "2.2.0", + "version": "2.2.1", "description": "HackMD Node.js API Client", "main": "dist/index.js", "declaration": "./dist/index.d.ts", diff --git a/nodejs/src/index.ts b/nodejs/src/index.ts index 5715e55..cb0ae0a 100644 --- a/nodejs/src/index.ts +++ b/nodejs/src/index.ts @@ -82,7 +82,7 @@ export default class API { await this.axios.patch(`notes/${noteId}`, { content }) } - async updateNote (noteId: string, options: Pick): Promise { + async updateNote (noteId: string, options: Partial>): Promise { return await this.axios.patch(`notes/${noteId}`, options) } @@ -109,7 +109,7 @@ export default class API { await this.axios.patch(`teams/${teamPath}/notes/${noteId}`, { content }) } - async updateTeamNote (teamPath: string, noteId: string, options: Pick): Promise { + async updateTeamNote (teamPath: string, noteId: string, options: Partial>): Promise { return await this.axios.patch(`teams/${teamPath}/notes/${noteId}`, options) }