Convert src/ directory from JavaScript to TypeScript#38
Closed
Convert src/ directory from JavaScript to TypeScript#38
Conversation
* add dayOfYear and 24 hour format * add * add diurnal * bump version * update * isValidLatitude * diurnal * diurnal and formatting * Formatting * Update * format * Update README.md * isNorthernHemisphere * Add short key * add keywords * bump version * launch file * refactor * add diurnal * Add type and files * add files * restructure folders * update * files * Delete .vs directory * Delete .vscode directory * Set mean temperature * add param * mean temp and set latitude * mean temp * comment * recursive tests * Update dirunal * add checks and method input * language * correct require path * Refactor * Refactor * Add * Use pressureReadings * cleanup * cleanup * keepPressureReadingsFor * add deprecated * comment * refactor * refactor * add latitude check * update algorithm * fix typo * add diurnal to observed pressure
Co-authored-by: oyve <16225018+oyve@users.noreply.github.com>
Co-authored-by: oyve <16225018+oyve@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Convert src/ from JavaScript to TypeScript
Convert src/ directory from JavaScript to TypeScript
Sep 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR converts all JavaScript files in the
src/directory to TypeScript while preserving all existing functionality and keeping JSON configuration files unchanged.Changes Made
TypeScript Conversion
PressureReading,TrendResult,Front, etc.tsconfig.jsonBuild System Updates
package.jsonindex.js) to use compiled JavaScript fromdist/directoryprepublishOnlyscript to ensure TypeScript compilation before package publishingtypescript,@types/node,@types/regression)JSON Files Preserved
All JSON configuration files remain unchanged as requested:
src/predictions/fronts.json- Weather front patternssrc/predictions/prediction_nh.json- Northern hemisphere predictionssrc/predictions/prediction_season.json- Seasonal weather predictionsTest Compatibility
dist/directoryvalueandcalculated.pressureASLproperties)Type Safety Improvements
The TypeScript conversion adds significant type safety benefits:
Verification
The conversion maintains 100% backward compatibility while adding the benefits of TypeScript's type system for improved developer experience and code reliability.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.