pnp / pnpjs

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
https://pnp.github.io/pnpjs/
Other
740 stars 300 forks source link

IItemAddResult not found in "@pnp/sp/items", nor anywhere else that I can find #3055

Closed ARUpw21 closed 1 month ago

ARUpw21 commented 1 month ago

What version of PnPjs library you are using

4.x

Minor Version Number

0.1

Target environment

All

Additional environment details

I'm running: nvm: 1.1.10 node 18.20.2 SPFx: 1.19

Question/Request

As per the documentation, https://pnp.github.io/pnpjs/sp/items/#add-items, I am trying to import IItemAddResult for use when adding an item to a SharePoint list.

However, on the code: import { IItemAddResult } from "@pnp/sp/items"; I get the error: Module '"@pnp/sp/items"' has no exported member 'IItemAddResult'.

bcameron1231 commented 1 month ago

Hi. Unfortunately this is just out of date documentation. We no longer return IItemAddResult from our requests. We just return the response back from the APIs.

https://pnp.github.io/pnpjs/transition-guide/#addupdate-methods-no-longer-returning-data-and-a-queryable-instance

We will update the documentation.

github-actions[bot] commented 1 month ago

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.