Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
chore: remove test file and document Twoslash in CLAUDE.md
Sushmithamallesh4311a1790094
diff --git a/fumadocs/CLAUDE.md b/fumadocs/CLAUDE.mdindex 6f7c68335..6b3f6c723 100644--- a/fumadocs/CLAUDE.md+++ b/fumadocs/CLAUDE.md@@ -40,6 +40,41 @@ CI auto-generates on changes to `ts/packages/core/src/**` or `python/composio/**4. **Root directory on Vercel**: Set to `fumadocs` with "Include files outside root directory" DISABLED5. **Mobile nav**: Always test CSS changes on mobile. Fumadocs uses different nav patterns (dropdown on mobile, horizontal on desktop). Avoid absolute positioning or pseudo-elements that assume horizontal layout.+## Twoslash - Code Block Type Checking++TypeScript code blocks can be type-checked at build time using Twoslash.++### How to use+Add `twoslash` to the code fence to enable type checking:++````md+```ts twoslash+import { Composio } from "@composio/core";+const composio = new Composio({ apiKey: "test" });+// ^? - hover shows type info in rendered docs+```+````++### Key features+- **Build-time validation**: Code blocks are compiled during build. Type errors fail the build.+- **Opt-in**: Only blocks with `twoslash` annotation are checked. Regular code blocks are unaffected.+- **CI enforcement**: `.github/workflows/fumadocs-build.yml` runs on PRs to fumadocs/++### Annotations+- `// ^?` - Show type on hover at that position+- `// @errors: 2322` - Expect specific error (won't fail build)+- `// @noErrors` - Skip all type checking for this block+- `// ---cut---` - Hide code above this line from output (but include for compilation)++### Configuration+- **Config**: `source.config.ts` - `transformerTwoslash({ explicitTrigger: true })`+- **SDK packages**: Installed as devDependencies for import resolution++### Troubleshooting+- If imports fail, ensure the package is in `devDependencies`+- Use `// @noErrors` for pseudocode or partial examples+- Check CI logs for specific error codes (e.g., 2322 = type mismatch)+## Deployment- Vercel project: `composio/fumadocs`- Uses `bun install` and `bun run build`diff --git a/fumadocs/content/docs/twoslash-test.mdx b/fumadocs/content/docs/twoslash-test.mdxdeleted file mode 100644index 078f4270d..000000000--- a/fumadocs/content/docs/twoslash-test.mdx+++ /dev/null@@ -1,41 +0,0 @@-----title: Twoslash Test-description: Testing Twoslash type checking------## Test 1: Basic TypeScript (should work)--```ts twoslash-const message: string = "Hello, world!";-console.log(message);-// ^?-```--## Test 2: Intentional type error (using @errors annotation)--```ts twoslash-// @errors: 2322-const num: number = "not a number";-```--## Test 3: Real Composio import--```ts twoslash-import { Composio } from "@composio/core";--const composio = new Composio({ apiKey: "test-key" });-// ^?-```--## Test 4: Anthropic example--```ts twoslash-import { Composio } from "@composio/core";-import { AnthropicProvider } from "@composio/anthropic";--const composio = new Composio({- apiKey: "test-key",- provider: new AnthropicProvider(),-});-```-