Skip to content

Commit

Permalink
Convert to TypeScript, see #1465
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 15, 2024
1 parent 614cbd3 commit 1a2a449
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/grunt/buildRunnable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import * as ChipperConstants from '../common/ChipperConstants';
import webpackBuild from './webpackBuild';
import generateThumbnails from './generateThumbnails';
import generateTwitterCard from './generateTwitterCard';
import _ from 'lodash';

const _ = require( 'lodash' );
const assert = require( 'assert' );
const ChipperStringUtils = require( '../common/ChipperStringUtils' );
const getLicenseEntry = require( '../common/getLicenseEntry' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/copySupplementalPhetioFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const buildStandalone = require( '../grunt/buildStandalone' );
const minify = require( '../grunt/minify' );
const marked = require( 'marked' );
const tsc = require( './tsc' );
const reportTscResults = require( './reportTscResults' );
import reportTscResults from './reportTscResults';
const getPhetLibs = require( './getPhetLibs' );
const path = require( 'path' );
const webpack = require( 'webpack' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

module.exports = ( results, grunt ) => {
export default (
results: { stderr: string; stdout: string; code: number; time: number },
grunt: { fail: { fatal: ( s: string ) => void }; log: { ok: ( s: string ) => void } }
): void => {
if ( ( results.stderr && results.stderr.length > 0 ) || results.code !== 0 ) {
grunt.fail.fatal( `tsc failed with code: ${results.code}
stdout:
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/tasks/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import buildRunnable from '../buildRunnable';
import reportTscResults from '../reportTscResults';

/**
* Builds the repository. Depending on the repository type (runnable/wrapper/standalone), the result may vary.
Expand Down Expand Up @@ -36,7 +37,6 @@ const buildStandalone = require( '../buildStandalone' );

const minify = require( '../minify' );
const tsc = require( '../tsc' );
const reportTscResults = require( '../reportTscResults' );
const path = require( 'path' );
const fs = require( 'fs' );
const getPhetLibs = require( '../getPhetLibs' );
Expand Down

0 comments on commit 1a2a449

Please sign in to comment.