Hi, I recently upgraded our playfab NodeSDK, and found a lot of our code to not compile with typescript. It seems as there was a change introduced in the commit referenced below, which broke the type references for us. Perhaps we are doing something wrong?
The actual change happened in the file PlayFabSdk/index.d.ts. Essentially all the path-references was changed with a types-reference, but that does not seem to work correctly, at least not for me.
Reverting to playfab-sdk version 2.38.191029 resolves the issue for me.
I'm using typescript 3.7.3
// Example code where typings stops working const winnerResults: PlayFabModule.IPlayFabSuccessContainer<PlayFabServerModels.GetLeaderboardResult> = await new Promise((resolve, reject) => { PlayFabServer.GetLeaderboard({ MaxResultsCount: 3, StatisticName: statsName, StartPosition: 0, // @ts-ignore PS: there is another issue here which I created on github: https://github.com/PlayFab/NodeSDK/issues/103 ProfileConstraints: { ShowLocations: true }, }, (getLeaderboardError, getLeaderboardResult) => { getLeaderboardError ? reject(getLeaderboardError) : resolve(getLeaderboardResult) }) })
Commit that introduces the change;
https://github.com/PlayFab/NodeSDK/commit/70a73999f24750a4cadbbcdfff117209ad66035a