Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix TypeScript 5.x compatibility issue for Angular 19 support#207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Copilot wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-202

Conversation

Copilot
Copy link

@CopilotCopilotAI commentedJul 2, 2025
edited
Loading

This PR resolves TypeScript compilation errors that occur when using the Angular plugin with newer TypeScript versions (5.x), particularly when using Angular 19.

Problem

Users reported TypeScript compilation errors when using the plugin with Angular 19 and TypeScript 5.6.2:

[ERROR] TS2322: Type 'AngularPlugin' is not assignable to type 'ITelemetryPlugin'.  Types of property 'setNextPlugin' are incompatible.

Root Cause

The issue was caused by a structural type mismatch between:

  • ITelemetryPlugin interface: definessetNextPlugin? as optional
  • BaseTelemetryPlugin class: implementssetNextPlugin as required
  • AngularPlugin class: inherits fromBaseTelemetryPlugin but doesn't explicitly declare the method

Newer TypeScript versions (5.x) are more strict about interface compliance and detected this inconsistency when assigningAngularPlugin instances toITelemetryPlugin variables.

Solution

Added an explicitsetNextPlugin method declaration to theAngularPlugin class with the correct signature:

public setNextPlugin:(next:ITelemetryPlugin|ITelemetryPluginChain)=>void;

This ensures perfect type compatibility while maintaining backward compatibility at runtime.

Changes

  • ✅ Added explicitsetNextPlugin signature toAngularPlugin class
  • ✅ AddedITelemetryPlugin import for type safety
  • ✅ Added comprehensive TypeScript compatibility tests
  • ✅ Verified all existing tests continue to pass
  • ✅ Confirmed Angular 19 compatibility with existing peer dependencies (>= 14.0.3)

Testing

  • All existing unit tests pass
  • New TypeScript compatibility tests verify the fix
  • Manual verification of type compatibility with TypeScript 5.6.2
  • Build and packaging process unchanged

The fix is minimal, surgical, and maintains full backward compatibility while resolving the TypeScript compilation issue for Angular 19 users.

Fixes#202.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3700 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-509950 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17030286228881518319,12981820356371280231,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-509950 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=509950 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=11079 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-17023879 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1868810141524795299,11611041768839343345,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • clients2.google.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3700 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-509950 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17030286228881518319,12981820356371280231,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-509950 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=509950 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=11079 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-17023879 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1868810141524795299,11611041768839343345,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • clientservices.googleapis.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3700 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-509950 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17030286228881518319,12981820356371280231,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-509950 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=509950 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=11079 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-17023879 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1868810141524795299,11611041768839343345,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • googlechromelabs.github.io
    • Triggering command:node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.92/linux64/chrome-headless-shell-linux64.zip
    • Triggering command:node install.mjs (http block)
  • redirector.gvt1.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3700 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-509950 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17030286228881518319,12981820356371280231,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-509950 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=509950 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=11079 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-17023879 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1868810141524795299,11611041768839343345,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3700 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-509950 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17030286228881518319,12981820356371280231,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-509950 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=509950 (dns block)
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=11079 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-17023879 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1868810141524795299,11611041768839343345,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • www.google.com
    • Triggering command:/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3700 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-509950 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17030286228881518319,12981820356371280231,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command:/opt/google/chrome/chrome --user-data-dir=/tmp/karma-509950 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=509950 (dns block)
  • www.googleapis.com
    • Triggering command:node install.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Clickhere to start the survey.

CopilotAIand others added2 commitsJuly 2, 2025 19:40
Co-authored-by: MSNev <54870357+MSNev@users.noreply.github.com>
Co-authored-by: MSNev <54870357+MSNev@users.noreply.github.com>
@CopilotCopilotAI changed the title[WIP] Angular 19 supportFix TypeScript 5.x compatibility issue for Angular 19 supportJul 2, 2025
@CopilotCopilotAI requested a review fromMSNevJuly 2, 2025 19:41
Copilot finished work on behalf ofMSNevJuly 2, 2025 19:41
@MSNevMSNev marked this pull request as ready for reviewJuly 7, 2025 21:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@MSNevMSNevMSNev approved these changes

At least 1 approving review is required to merge this pull request.

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Angular 19 support
2 participants
@Copilot@MSNev

[8]ページ先頭

©2009-2025 Movatter.jp