Closed gadfly361 closed 4 months ago
Hi @gadfly361, thanks for sharing this.
Since the current code compiles and can work without any issues, I call this a bug on the Deno VS Code plugin. That being said, this is frustrating for developers, so I will update the document section as below:
import { SlackApp, SlackEdgeAppEnv, SlackSocketModeAppEnv } from "https://deno.land/x/slack_edge@0.10.8/mod.ts";
const app = new SlackApp<SlackEdgeAppEnv>({
env: {
SLACK_SIGNING_SECRET: Deno.env.get("SLACK_SIGNING_SECRET")!,
SLACK_BOT_TOKEN: Deno.env.get("SLACK_BOT_TOKEN"),
SLACK_LOGGING_LEVEL: "DEBUG",
},
});
const app2 = new SlackApp<SlackSocketModeAppEnv>({
env: {
SLACK_APP_TOKEN: Deno.env.get("SLACK_APP_TOKEN")!,
SLACK_BOT_TOKEN: Deno.env.get("SLACK_BOT_TOKEN"),
SLACK_LOGGING_LEVEL: "DEBUG",
},
});
Thanks again for flagging this!
@seratch That works, thank you so much for the quick reply! 🍻
First, thank you so much for this library! I am trying to test this out using Deno and got an unexpected linting error from a README example.
The snippet below is from the README for Deno.
I am seeing a linter issue with a squiggly line under
env
that seems to be complaining about types. The message is as follows:The
env
appears to take inSlackAppOptions
and it can take inSlackEdgeAppEnv
orSlackSocketModeAppEnv
.I think the README example is trying to make use of
SlackEdgeAppEnv
, so looking at that I see:Should
SlackAppEnv
(thatSlackEdgeAppEnv
depends on) include theSLACK_APP_TOKEN
? If so, does the README example need to be updated?