Skip to content

Commit

Permalink
Use 'default as' import
Browse files Browse the repository at this point in the history
  • Loading branch information
tyfkda committed Oct 10, 2024
1 parent f7a452c commit fab6638
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@babel/core": "~7.23.2",
"@babel/preset-env": "~7.23.2",
"@babel/register": "~7.22.15",
"@types/escape-html": "~1.0.4",
"@types/fscreen": "~1.0.3",
"@types/jest": "~29.5.1",
"@types/md5": "~2.3.4",
Expand Down
21 changes: 21 additions & 0 deletions src/@types/stats-js.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Type definitions for Stats.js 0.16.0
// Project: http://github.com/mrdoob/stats.js
// Definitions by: Gregory Dalton <https://github.com/gregolai>, Harm Berntsen <https://github.com/hberntsen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

// declare class Stats {
// REVISION: number;
// dom: HTMLDivElement;

// /**
// * @param value 0:fps, 1: ms, 2: mb, 3+: custom
// */
// showPanel(value: number): void;
// begin(): void;
// end(): number;
// update(): void;
// }

declare module "stats-js" {
export = any; //Stats;
}
3 changes: 1 addition & 2 deletions src/app/key_config_wnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {WindowManager} from '../wnd/window_manager'
import {Wnd} from '../wnd/wnd'
import {WndEvent} from '../wnd/types'

// import * as escape from 'escape-html'
const escape = require('escape-html') // eslint-disable-line @typescript-eslint/no-var-requires
import {default as escape} from 'escape-html'

interface GamepadButtonOption {
width?: number
Expand Down
3 changes: 1 addition & 2 deletions src/app/other_wnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {AppEvent} from './app_event'
import {Util} from '../util/util'

import * as Pubsub from '../util/pubsub'
// import * as Stats from 'stats-js'
const Stats = require('stats-js') // eslint-disable-line @typescript-eslint/no-var-requires
import {default as Stats} from 'stats-js'

import aboutHtmlContent from '../res/about.html'

Expand Down

0 comments on commit fab6638

Please sign in to comment.