WeSDK - The SDK Noone Asked For

FAQ

Is this SDK only for Luffa mini program web-view?

Primarily yes. It is designed for bridge-based host runtimes and can also detect unsupported environments safely.

Can I use callbacks like the legacy SDK?

Yes for most APIs. v2 is Promise-first, and callback options remain for compatibility.

Why should I still use Promise style if callbacks work?

Promise flow is easier to compose, test, and maintain, and maps better to modern async code.

How do I know if an API is available before calling it?

Use:

How do I handle no-bridge browser mode?

Does v2 support TypeScript?

Yes. Public typings are provided in index.d.ts and exposed via package types metadata.

What should I log in production?

At minimum:

Is invoke safe to use directly?

It is intended for advanced/extension scenarios. Prefer dedicated typed methods when available.

How do I migrate incrementally from v1?

Where should new developers start?

Start with:

  1. Getting Started
  2. Core Concepts
  3. Runtime and Capabilities