webiny-js
webiny-js copied to clipboard
Merged declaration 'PinsMutation' cannot include a default export declaration. Consider adding a separate 'export default PinsMutation' declaration instead.ts(2652)
Version
5.21.0
Operating System
Windows 10
Browser
Google Chrome
What steps will reproduce the bug?
Following the tutorial for the pinterest-clone and arrived at the point of Implementing Authentication and Authorization Checks i'll get an error: Merged declaration 'PinsMutation' cannot include a default export declaration. Consider adding a separate 'export default PinsMutation' declaration instead.ts(2652) line 32 and line 42 https://github.com/webiny/webiny-examples/blob/master/create-custom-application/fu[…]de/graphql/src/plugins/scaffolds/pins/resolvers/PinsMutation.ts
What is the expected behavior?
No errors
What do you see instead?
Error on line 32 and 42: Merged declaration 'PinsMutation' cannot include a default export declaration. Consider adding a separate 'export default PinsMutation' declaration instead.ts(2652)
Additional information
Same issue for the PinsQuery.ts in the same folder line 28
Possible solution
on line 32 replace
interface PinsMutation { createPin(params: CreatePinParams): Promise<PinEntity>; updatePin(params: UpdatePinParams): Promise<PinEntity>; deletePin(params: DeletePinParams): Promise<PinEntity>; }
with
export default interface PinsMutation { createPin(params: CreatePinParams): Promise<PinEntity>; updatePin(params: UpdatePinParams): Promise<PinEntity>; deletePin(params: DeletePinParams): Promise<PinEntity>; }
This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.