Skip to content

docs: map plugin method return types to TypeScript - #595

Open
riderx wants to merge 1 commit into
ionic-team:mainfrom
riderx:docs-method-types-ts-signatures
Open

docs: map plugin method return types to TypeScript#595
riderx wants to merge 1 commit into
ionic-team:mainfrom
riderx:docs-method-types-ts-signatures

Conversation

@riderx

@riderx riderx commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to Clarify return types for Capacitor iOS plugins #471. Return types belong on Method Types for all platforms, but that page used never and did not show what to declare in src/definitions.ts.
  • Map each native returnType to the TypeScript signature (Promise<void>, Promise<T>, callback + Promise<CallbackID>), and note that never cannot be implemented in web.ts.
  • Link the iOS and Android plugin guides to that page instead of duplicating the native return-type list.

Test plan

  • Check Method Types shows the TypeScript ↔ Android ↔ iOS table and per-section definitions.ts snippets
  • Confirm void methods are documented as Promise<void> (not never)
  • Confirm iOS and Android creating-plugin guides link to Method Types

Made with Cursor

method-types listed native return types but used `never`,
which cannot be implemented in definitions.ts or web.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

@riderx is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@riderx
riderx marked this pull request as ready for review August 16, 2026 12:36
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.

1 participant