Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to TypeScript #749

Closed
samreid opened this issue Oct 14, 2021 · 5 comments
Closed

Port to TypeScript #749

samreid opened this issue Oct 14, 2021 · 5 comments
Milestone

Comments

@samreid
Copy link
Member

samreid commented Oct 14, 2021

After having a positive experience in porting bending-light to TypeScript in phetsims/bending-light#401, it seems beneficial to port Circuit Construction Kit to TypeScript. I was previously reluctant to do so, since AC was nearing publication and I didn't want to delay it at all. However, we are awaiting some design decisions and QA, and I have a better understanding of the scope of effort for the port, I think there is time to do it now. This will also help us through QA, if it helps prevent bugs. I will also be able to benefit from it right away, since right after CCK AC publication, we plan to continue with phet-io instrumentation in #589 and #513. This repo has 17000 LOC, so it will take longer than bending light. Also, like PhET-iO, there is a cost associated with having too many sims "instrumented" before we have established all our patterns, but this seems like a good opportunity to help establish patterns.

UPDATE: As I've started this process, TypeScript has helped clarify so many confusing parts, especially around the Modified Nodal Analysis that it seems important for the long term maintainability of the sim, and it should be included in 1.0. I will endeavor to do so without delaying the publication timeline.

@samreid samreid self-assigned this Oct 14, 2021
samreid added a commit to phetsims/circuit-construction-kit-dc-virtual-lab that referenced this issue Oct 14, 2021
samreid added a commit to phetsims/circuit-construction-kit-ac-virtual-lab that referenced this issue Oct 14, 2021
samreid added a commit to phetsims/circuit-construction-kit-ac that referenced this issue Oct 14, 2021
samreid added a commit to phetsims/circuit-construction-kit-black-box-study that referenced this issue Oct 14, 2021
samreid added a commit to phetsims/circuit-construction-kit-dc that referenced this issue Oct 14, 2021
samreid added a commit that referenced this issue Oct 14, 2021
samreid added a commit to phetsims/tandem that referenced this issue Oct 14, 2021
samreid added a commit that referenced this issue Oct 14, 2021
samreid added a commit that referenced this issue Oct 15, 2021
@samreid
Copy link
Member Author

samreid commented Oct 15, 2021

Discovered bugs:

    if ( this.zoomAnimation ) {
      const overflow = this.zoomAnimation.step( dt ); // always returns undefined
      if ( overflow > 0 ) {
        this.zoomAnimation = null;
      }
    }
  • Incorrect type documentation in ResultSet.
  • Revealed 150 lines of unused code
  • Bad JSDoc in TimestepSubdivisions * @returns {number} the selected timestep that has acceptable error or meets the minimum allowed was returning object.
  • Numerous problems with inner classes in MNA.
  • Meter code data overwritten in subtype
  • Bogus 3rd arg being passed through to startDragVertex. It only has 2 parameters.
  • Numerous JSDoc inconsistencies
  • passing arguments to createElement that do not exist
  • Even more incorrect JSDoc
  • GET_LAYOUT_POSITION is always undefined:
    image
    Apparently it was removed in 2017: 500640c
  • Options not optional in FuseTripAnimation:

image

@samreid samreid reopened this Jan 5, 2022
samreid added a commit that referenced this issue Jan 7, 2022
samreid added a commit that referenced this issue Jan 7, 2022
samreid added a commit that referenced this issue Jan 7, 2022
samreid added a commit that referenced this issue Jan 7, 2022
samreid added a commit that referenced this issue Jan 7, 2022
samreid added a commit that referenced this issue Jan 7, 2022
samreid added a commit to phetsims/phet-info that referenced this issue Apr 23, 2022
samreid added a commit to phetsims/phet-info that referenced this issue Apr 23, 2022
samreid added a commit to phetsims/phet-info that referenced this issue Apr 23, 2022
samreid added a commit to phetsims/phet-info that referenced this issue Apr 23, 2022
@samreid samreid removed their assignment Aug 3, 2022
@samreid
Copy link
Member Author

samreid commented Feb 13, 2023

TypeScript is going well here, closing.

@samreid samreid closed this as completed Feb 13, 2023
samreid added a commit to phetsims/perennial that referenced this issue Oct 22, 2024
samreid added a commit to phetsims/perennial that referenced this issue Oct 22, 2024
samreid added a commit to phetsims/perennial that referenced this issue Oct 22, 2024
samreid added a commit to phetsims/perennial that referenced this issue Oct 22, 2024
samreid added a commit to phetsims/perennial that referenced this issue Oct 22, 2024
zepumph pushed a commit to phetsims/perennial that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant