Skip to content

fix(engine): expose Engine instance type from CherryEngine - #1903

Merged
sunsonliu merged 1 commit into
Tencent:devfrom
FOWEPJF255:fix/cherry-engine-constructor-type-1822
Oct 16, 2026
Merged

sunsonliu merged 1 commit into
Tencent:devfrom
FOWEPJF255:fix/cherry-engine-constructor-type-1822

Conversation

@FOWEPJF255

Copy link
Copy Markdown
Contributor

Summary

  • Correct the exported CherryEngine constructor type so new CherryEngine() is typed as the Engine instance returned at runtime.
  • Retain the existing static plugin APIs and constructor argument compatibility.
  • Remove type-error suppressions from engine tests and add a patch changeset.

Closes #1822.

Verification

  • yarn typecheck:core — passed.
  • yarn test:core — 130 files, 2,419 tests passed.
  • yarn lint — 0 errors; existing repository warnings remain.
  • yarn build:core — passed.
  • node node_modules/es-check/index.js es5 packages/cherry-markdown/dist/cherry-markdown.js — passed.
  • yarn --cwd packages/cherry-markdown test:artifacts — 6 of 7 passed. On Windows, the ES5 test gives es-check a backslash absolute path, which its glob parser treats as missing. Running the equivalent ES5 check with a forward-slash path passes.

@changeset-bot

changeset-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 63bbf40

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
cherry-markdown Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tencent-adm

tencent-adm commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

CLA assistant check
All committers have signed the CLA.

@sunsonliu sunsonliu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM,感谢贡献

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

cherry-markdown

pnpm add https://pkg.pr.new/cherry-markdown@1903
npm i https://pkg.pr.new/cherry-markdown@1903
yarn add https://pkg.pr.new/cherry-markdown@1903.tgz

@cherry-markdown/miniprogram

pnpm add https://pkg.pr.new/@cherry-markdown/miniprogram@1903
npm i https://pkg.pr.new/@cherry-markdown/miniprogram@1903
yarn add https://pkg.pr.new/@cherry-markdown/miniprogram@1903.tgz

commit: 63bbf40

@cherry-markdown-bot

Copy link
Copy Markdown
Collaborator

🔌 VSCode Plugin 构建产物

下载 .vsix

⏰ 产物保留 5 天

@cherry-markdown-bot

Copy link
Copy Markdown
Collaborator

💻 Client 构建产物

平台 架构 产物类型 下载
macOS Apple Silicon App 应用 下载
macOS Apple Silicon DMG 安装包 下载
macOS x64 DMG 安装包 下载
macOS x64 App 应用 下载
Windows x64 MSI 安装包 下载
Windows x64 EXE 安装程序 下载
Linux x64 Deb 包 下载
Linux x64 AppImage 下载

⏰ 产物保留 5 天

@cherry-markdown-bot

Copy link
Copy Markdown
Collaborator

@sunsonliu
sunsonliu merged commit 856bf21 into Tencent:dev Oct 16, 2026
18 checks passed
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.

CherryEngine 构造器返回类型与 TypeScript 声明不一致

4 participants