question

csoong95 avatar image
csoong95 asked

playfab-web-sdk typdef file throws error when building typescript

I have been using the playfab-web-sdk node module to provide type definitions for my project. However, when including the Playfab.d.ts file, it causes an error when trying to build:

node_modules/playfab-web-sdk/src/Typings/PlayFab/Playfab.d.ts:46:25 - error TS7006: Parameter 'IPlayFabError' implicitly has an 'any' type.

46     GenerateErrorReport(IPlayFabError): string;

I have found a workaround in editing the Playfab.d.ts file manually and changing line 46 to:

GenerateErrorReport(error: PlayFabModule.IPlayFabError): string;

but it would be preferable not to have to do this after installing/updating modules in the project

sdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

The playfab-web-sdk module is for building JavaScript applications. For NodeJs, there is a playfab-sdk module. Could you please use that module instead and see if there is any error?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.