Skip to content

docs: fix package imports and Kalshi SDK examples - #2316

Open
mikevillari wants to merge 2 commits into
pmxt-dev:mainfrom
mikevillari:fix/documentation-package-imports
Open

docs: fix package imports and Kalshi SDK examples#2316
mikevillari wants to merge 2 commits into
pmxt-dev:mainfrom
mikevillari:fix/documentation-package-imports

Conversation

@mikevillari

Copy link
Copy Markdown

The two guides import TypeScript examples from the nonexistent pmxt npm package. This fixes their package imports and keeps each guide aligned with the actual exported API.

Closes #2313.

  • The core error guide uses pmxt-core, which exports the documented BaseError, NotFound, and HTTP status property. Simply replacing these imports with pmxtjs would leave missing exports. Added an explicit package distinction and link to the SDK error reference.
  • Kalshi setup uses pmxtjs, Kalshi/KalshiDemo, and flat constructor options. Removed a duplicate const kalshi declaration and included the required outcome ID placeholder.
  • The native Polymarket retry helper uses InstanceType<typeof Polymarket> because the core convenience export is a constructor value.

Validation: extracted all 16 TypeScript fences and checked them against the checkout's real public entry points with TypeScript (ES2022/ESNext/bundler, strict, useUnknownInCatchVariables=false for the guides' existing catch examples). Original snippets produced 18 diagnostics; updated snippets have zero snippet-level diagnostics. Two dependency diagnostics remain because the checkout lacks sdks/typescript/generated/src/index.js. The attempted SDK build fails for those same missing generated imports; full-project compilation is not claimed. git diff --check passes.

Documentation only. No examples, exchange requests, or orders executed. The root integration suite, which starts a sidecar and performs real integration checks, was not run; full tests remain a merge gate. AI-assisted source verification and editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core/docs/ERRORS.md and SETUP_KALSHI.md TypeScript samples import from a nonexistent 'pmxt' package

1 participant