feat(methods): add chat.postMessage example (typecheck-only) - #139
Draft
zimeg wants to merge 5 commits into
Draft
Conversation
Add a methods/ chat.postMessage example verified by tsc --checkJs + Biome lint, with no runtime test. The type-check validates the payload against @slack/web-api's real ChatPostMessageArguments type, catching wrong or misspelled arguments (e.g. chnnel -> TS2561) without a mock server. This is an alternative to the fetch-stub runtime-test approach for side-by-side comparison. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Add methods to the CI matrix and use `npm test --if-present` so the type-check-only methods example (which has no test script) passes CI while still running lint and check. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@slack/web-api v8 is now GA; move off the 8.0.0-rc.2 release candidate to the stable ^8.0.0 range, matching the caret style used by block-kit. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Match the runtime-test branch: add @slack/cli-hooks, a .slack/ workspace, and a chat manifest.json requesting only chat:write. Move scopes out of the README into the manifest and document the `slack install` flow with the method's exact docs description. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Move @slack/cli-hooks to stable ^2.0.0 (get-hooks bin unchanged) and remove skipLibCheck so tsc fully type-checks library declarations by default, matching block-kit. The tsconfig already scopes include to src only (this variant has no tests). Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds a
methods/chat.postMessageexample verified by type-check + lint only — no runtime test.tsc --checkJsvalidates the payload against@slack/web-api's realChatPostMessageArgumentstype, catching wrong or misspelled arguments (e.g.chnnel→ TS2561) at check time.tests/directory, no fetch-stub mock server.Comparison PR. This is an alternative to the fetch-stub runtime-test approach (see the other
methods-examplesbranch / PR #138) for side-by-side evaluation of testing strategy across the example repos.Testing
export SLACK_TOKEN="xoxb-..."thennode chat/src/chat-post-message.jsfrommethods/; confirm the message posts.🤖 Generated with Claude Code