From 2a9d19ff661fd625a5f96ba3fe3e8a22bebdde4e Mon Sep 17 00:00:00 2001 From: Beau Cameron Date: Mon, 13 Oct 2025 10:07:07 -0600 Subject: [PATCH 1/2] LikedByInformation Deprecation --- docs/sp/comments-likes.md | 2 +- packages/sp/comments/item.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/sp/comments-likes.md b/docs/sp/comments-likes.md index 5abad7a87..3cd754a52 100644 --- a/docs/sp/comments-likes.md +++ b/docs/sp/comments-likes.md @@ -252,7 +252,7 @@ await item.like(); // unlike an item await item.unlike(); -// get the liked by information +// ⚠️ getLikedByInformation is deprecated for Items, as the SharePoint REST API no longer works for regular list items. Will continue to work for pages & comments. const likedByInfo: ILikedByInformation = await item.getLikedByInformation(); ``` diff --git a/packages/sp/comments/item.ts b/packages/sp/comments/item.ts index f81109471..06fcd86d0 100644 --- a/packages/sp/comments/item.ts +++ b/packages/sp/comments/item.ts @@ -63,6 +63,9 @@ _Item.prototype.unlike = async function (this: _Item) { return spPost(SPQueryable([this, likeUrl])); }; + /** + * @deprecated This method is deprecated as this navigation property does not work in the Microsoft SharePoint REST API. +*/ _Item.prototype.getLikedByInformation = function (this: _Item): Promise { return Item(this, "likedByInformation").expand("likedby")(); }; From 963961565717e40f3d1f5bba89ba1cc25d2018f1 Mon Sep 17 00:00:00 2001 From: Beau Cameron Date: Mon, 13 Oct 2025 10:11:29 -0600 Subject: [PATCH 2/2] Lint fix. --- packages/sp/comments/item.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sp/comments/item.ts b/packages/sp/comments/item.ts index 06fcd86d0..059f8c3ea 100644 --- a/packages/sp/comments/item.ts +++ b/packages/sp/comments/item.ts @@ -63,8 +63,8 @@ _Item.prototype.unlike = async function (this: _Item) { return spPost(SPQueryable([this, likeUrl])); }; - /** - * @deprecated This method is deprecated as this navigation property does not work in the Microsoft SharePoint REST API. +/** +* @deprecated This method is deprecated as this navigation property does not work in the Microsoft SharePoint REST API. */ _Item.prototype.getLikedByInformation = function (this: _Item): Promise { return Item(this, "likedByInformation").expand("likedby")();