Skip to content

fix(types): expose Lynx runtime globals in editor - #6

Open
icecreamx10 wants to merge 2 commits into
lynx-community:mainfrom
icecreamx10:codex/editor-stability-and-diagnostics
Open

fix(types): expose Lynx runtime globals in editor#6
icecreamx10 wants to merge 2 commits into
lynx-community:mainfrom
icecreamx10:codex/editor-stability-and-diagnostics

Conversation

@icecreamx10

@icecreamx10 icecreamx10 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expose Lynx runtime timer and console globals to the built-in TypeScript language service without enabling DOM or Node types
  • remove task-specific workflow notes so future implementation context lives in commit history

Root cause

The installed @lynx-js/types package places timer declarations outside declare global and exports Console without declaring the global console variable. Lynxtron GO therefore reported valid runtime APIs such as setInterval, clearTimeout, and console as unresolved names.

Implementation

Inject a minimal virtual declaration file only for Lynx projects that explicitly use @lynx-js/types with an ES-only lib. Browser and Node globals remain unavailable to Lynx UI code.

Validation

  • passed the focused TypeScript language-service regression test covering all timer globals and console
  • built the production desktop rspack bundle; only the two existing dynamic-require warnings remain
  • restarted the app and verified the rebuilt extension host loads successfully
  • git diff --check passed

The broader language-service suite retains one pre-existing failure where the desktop host's fetch() resolves to the wrong Response type.

Remove task-specific files from docs/workflows. Future implementation context, root causes, platform caveats, and validation results belong in commit messages instead of repository workflow documents.
Inject a minimal virtual declaration file for Lynx UI projects that explicitly use @lynx-js/types with an ES-only lib. This exposes console and the timeout/interval globals without enabling DOM or Node APIs.

The installed @lynx-js/types package declares timer functions outside declare global and exports Console without a global console variable, so Lynxtron GO reported valid runtime APIs as unresolved names.

Validated with the TypeScript language-service regression test and a production desktop rspack build. The broader language-service suite still has the pre-existing desktop Response diagnostic failure.
@icecreamx10
icecreamx10 force-pushed the codex/editor-stability-and-diagnostics branch from c93b8b6 to 833519a Compare July 22, 2026 04:06
@icecreamx10 icecreamx10 changed the title fix: stabilize editor rendering and diagnostics fix(types): expose Lynx runtime globals in editor Jul 22, 2026
@icecreamx10
icecreamx10 marked this pull request as ready for review July 22, 2026 06:00
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