Skip to content

Conversation

@fredj
Copy link
Contributor

@fredj fredj commented Oct 31, 2025

No description provided.

@fredj fredj requested a review from Copilot October 31, 2025 09:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the cesium-compass package from JavaScript with JSDoc type annotations to TypeScript with decorators. The migration modernizes the build configuration and code structure to use native TypeScript features instead of JavaScript with type comments.

  • Converts the main component file from JavaScript to TypeScript
  • Replaces JSDoc type annotations with TypeScript types and interfaces
  • Migrates from static get properties() to decorator-based property definitions using @property and @state

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.json Updated TypeScript configuration with ES2021 target, added lib options, and enabled experimental decorators
packages/cesium-compass/tsconfig.json Added package-specific TypeScript configuration with decorator support
packages/cesium-compass/package.json Added "type": "module", defined source file, and added build script
packages/cesium-compass/cesium-compass.ts Converted from JSDoc to TypeScript with decorators, added type annotations and interfaces
demos/cesium-compass.html Updated demo to load TypeScript source file instead of compiled JavaScript
Comments suppressed due to low confidence (2)

packages/cesium-compass/cesium-compass.ts:158

  • Debug console.log statement should be removed before merging to production.
    packages/cesium-compass/cesium-compass.ts:50
  • The FIXME comment suggests uncertainty about the initial value. Since this is a TypeScript migration, the type should be either boolean (initialized to false) or boolean | undefined if undefined is a valid state. The comment should be resolved or removed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<script src="https://cesium.com/downloads/cesiumjs/releases/1.134/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.134/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<script src="../packages/cesium-compass/cesium-compass.js" type="module"></script>
<script src="../packages/cesium-compass/cesium-compass.ts" type="module"></script>
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

The demo is loading the TypeScript source file directly. This will only work in development with a transpiler. For a production demo, this should load the compiled JavaScript file (cesium-compass.js) as defined in package.json's 'main' field.

Suggested change
<script src="../packages/cesium-compass/cesium-compass.ts" type="module"></script>
<script src="../packages/cesium-compass/cesium-compass.js" type="module"></script>

Copilot uses AI. Check for mistakes.
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.

2 participants