TS2353: 'slack' does not exist in type 'MessageRecipient' (@trycourier/courier)

Sending to Slack via @trycourier/courier 6.0.6 with courier.send({ message: { to: { slack: { access_token, channel } }, data: { message } } }) fails TypeScript compilation: error TS2353: Object literal may only specify known properties, and 'slack' does not exist in type 'MessageRecipient', even though the Courier docs show exactly this shape. Reinstalling, upgrading to 6.0.6, and resetting lockfiles did not change anything. The docs example and the shipped typings disagreed.

The Recipient type was missing the slack property (it existed in UserProfile but was not carried over to MessageRecipient), so the documented send shape failed type checks. The maintainer confirmed the miss and shipped the corrected typings in @trycourier/courier@6.0.7. Upgrade to 6.0.7 or later. Source: https://github.com/trycourier/courier-node/issues/176

Source: https://github.com/trycourier/courier-node/issues/176