Skip to content

docs: describe what the actor interface file declares - #203

Open
marc0olo wants to merge 2 commits into
mainfrom
docs/actor-interface-file
Open

marc0olo wants to merge 2 commits into
mainfrom
docs/actor-interface-file

Conversation

@marc0olo

@marc0olo marc0olo commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #158.

The <service-name>.d.ts from --actor-interface-file was described as containing "the same types" as <service-name>.ts. It leaves out the actor class and declares createActor to return <service-name>Interface. This corrects the description in the three places that make the claim; the generated output does not change.

where before after
CLI help (--actor-interface-file) and the icp-bindgen module docs "contains the same types of the <service-name>.ts file" "declares the types of the <service-name>.ts file without the <service-name> class: its createActor returns the <service-name>Interface type"
JSDoc of output.actor.interfaceFile the same claim the same correction, and the stray apostrophe in "LLMs' contexts'"
structure.md, <service-name>.d.ts "contains the same TypeScript types" lists what the file declares, that it leaves out the class, and why code written from it compiles against the .ts; states that it is a reference and not imported, since an import of ./<service-name> resolves to the .ts next to it

The CLI help snapshot (tests/snapshots/cli/help.snapshot) moves with the help text. Checked against the example and hello_world snapshots, and with tsc --traceResolution for the import resolution.

🤖 Generated with Claude Code

The .d.ts written by --actor-interface-file was described as containing
the same types as the .ts file. It leaves out the actor class, and its
createActor returns the service interface. Say so, and that the file is
a reference: an import resolves to the .ts next to it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The documentation consistently matches the generated snapshots and addresses the reported inaccuracies.

Review effort: Balanced
Findings: None

What changed in this PR

Clarifies the actor interface declaration file’s contents and intended reference-only usage; generated output remains unchanged.

Changes:

  • Documents omitted actor class and createActor return type.
  • Corrects the stray apostrophe in “LLMs’ contexts.”
  • Explains TypeScript module resolution behavior.
File Description
src/​core/​generate/​index.ts Corrects interfaceFile API documentation.
src/​cli/​icp-bindgen.ts Updates CLI help and module documentation.
docs/​src/​content/​docs/​structure.md Details declarations and intended usage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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.

Docs: --actor-interface-file is said to contain the same types as the .ts, but it leaves out the actor class

2 participants