Skip to content

Commit

Permalink
Improve linting and type checking in phet-types.d.ts, see #1219
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Apr 8, 2022
1 parent 5d13ca0 commit 1ce8c7c
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions phet-types.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright 2021, University of Colorado Boulder
/* eslint-disable */
// @ts-nocheck

/**
* Ambient type declarations for PhET code. Many of these definitions can be moved/disabled once the common code is
Expand All @@ -9,17 +7,12 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

// See https://stackoverflow.com/a/51114250/3408502
RoundButtonOptions = import('../sun/buttons/RoundButton.ts').RoundButtonOptions;
declare var assert: undefined | ( ( x: any, s?: string ) => void ); // eslint-disable-line no-unused-vars, no-var
declare var assertSlow: undefined | ( ( x: any, s?: string ) => void ); // eslint-disable-line no-unused-vars, no-var
declare var sceneryLog: undefined | any; // eslint-disable-line no-unused-vars, no-var
declare var phet: any; // eslint-disable-line no-unused-vars, no-var

declare var assert: undefined | ( ( x: any, s?: string ) => void );
declare var assertSlow: undefined | ( ( x: any, s?: string ) => void );
declare var sceneryLog: undefined | any;
declare var phet: any;

type QSMType = {
getAll: ( a: any ) => any,
containsKey: ( key: string ) => boolean
};

declare var QueryStringMachine: QSMType;
declare var QueryStringMachine: { // eslint-disable-line no-unused-vars, no-var
getAll: ( a: any ) => any;
containsKey: ( key: string ) => boolean;
};

0 comments on commit 1ce8c7c

Please sign in to comment.