mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Fix TypeScript errors
This commit is contained in:
parent
a187cd7f25
commit
fa60c792f8
@ -31,7 +31,7 @@
|
||||
"@openreplay/tracker": "^3.5.12",
|
||||
"@openreplay/tracker-fetch": "^3.5.3",
|
||||
"@types/cordova": "^0.0.34",
|
||||
"@types/filesystem": "^0.0.29",
|
||||
"@types/filesystem": "^0.0.32",
|
||||
"ajv": "^6.10.2",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-loader": "^8.0.4",
|
||||
@ -63,7 +63,7 @@
|
||||
"strictdom": "^1.0.1",
|
||||
"string-replace-webpack-plugin": "^0.1.3",
|
||||
"terser-webpack-plugin": "^1.1.0",
|
||||
"typescript": "3.9.3",
|
||||
"typescript": "^4.7.4",
|
||||
"uglify-template-string-loader": "^1.1.0",
|
||||
"unused-files-webpack-plugin": "^3.4.0",
|
||||
"webpack": "^4.43.0",
|
||||
|
@ -1,3 +1,7 @@
|
||||
/* typehints:start */
|
||||
import { Component } from "../../component";
|
||||
/* typehints:end */
|
||||
|
||||
import { globalConfig } from "../../../core/config";
|
||||
import { DrawParameters } from "../../../core/draw_parameters";
|
||||
import { createLogger } from "../../../core/logging";
|
||||
|
14
src/js/globals.d.ts
vendored
14
src/js/globals.d.ts
vendored
@ -204,6 +204,20 @@ declare interface TypedSignal<T extends Array<any>> {
|
||||
declare type Layer = "regular" | "wires";
|
||||
declare type ItemType = "shape" | "color" | "boolean";
|
||||
|
||||
/** Used for A/B testing */
|
||||
declare function setAbt(abt): void;
|
||||
|
||||
declare interface Location {
|
||||
/**
|
||||
* Reloads the current page.
|
||||
*
|
||||
* @deprecated
|
||||
* @param forceGet Non-standard parameter to bypass the cache,
|
||||
* only supported in some version of Firefox.
|
||||
*/
|
||||
reload(forceGet: boolean): void;
|
||||
}
|
||||
|
||||
declare module "worker-loader?inline=true&fallback=false!*" {
|
||||
class WebpackWorker extends Worker {
|
||||
constructor();
|
||||
|
@ -21,6 +21,7 @@ if (!G_IS_STANDALONE && !G_IS_DEV) {
|
||||
projectKey: "mhZgUFQBI6QAtt3PRLer",
|
||||
respectDoNotTrack: true,
|
||||
revID: G_BUILD_COMMIT_HASH,
|
||||
// @ts-ignore
|
||||
heatmaps: false,
|
||||
verbose: false,
|
||||
captureIFrames: false,
|
||||
|
@ -106,7 +106,7 @@ export const types = {
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {SingletonFactoryTemplate<*>} innerType
|
||||
* @param {SingletonFactoryTemplate<*>} registry
|
||||
*/
|
||||
classRef(registry) {
|
||||
return new TypeMetaClass(registry);
|
||||
|
@ -522,6 +522,7 @@ export class MainMenuState extends GameState {
|
||||
}
|
||||
|
||||
fetchPlayerCount() {
|
||||
/** @type {HTMLElement | null} */
|
||||
const element = this.htmlElement.querySelector(".onlinePlayerCount");
|
||||
if (!element) {
|
||||
return;
|
||||
|
@ -39,7 +39,9 @@ export class PreloadState extends GameState {
|
||||
this.lastHintShown = -1000;
|
||||
this.nextHintDuration = 0;
|
||||
|
||||
/** @type {HTMLElement} */
|
||||
this.statusText = this.htmlElement.querySelector("#ll_preload_status");
|
||||
/** @type {HTMLElement} */
|
||||
this.progressElement = this.htmlElement.querySelector("#ll_progressbar span");
|
||||
|
||||
this.startLoading();
|
||||
@ -66,7 +68,7 @@ export class PreloadState extends GameState {
|
||||
}
|
||||
|
||||
startLoading() {
|
||||
this.setStatus("Booting")
|
||||
this.setStatus("Booting", 0)
|
||||
|
||||
.then(() => this.setStatus("Creating platform wrapper", 3))
|
||||
.then(() => authorizeViaSSOToken(this.app, this.dialogs))
|
||||
@ -281,6 +283,7 @@ export class PreloadState extends GameState {
|
||||
/**
|
||||
*
|
||||
* @param {string} text
|
||||
* @param {number} progress
|
||||
*/
|
||||
setStatus(text, progress) {
|
||||
logger.log("✅ " + text);
|
||||
|
22
yarn.lock
22
yarn.lock
@ -1134,17 +1134,17 @@
|
||||
resolved "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz"
|
||||
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==
|
||||
|
||||
"@types/filesystem@^0.0.29":
|
||||
version "0.0.29"
|
||||
resolved "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.29.tgz"
|
||||
integrity sha512-85/1KfRedmfPGsbK8YzeaQUyV1FQAvMPMTuWFQ5EkLd2w7szhNO96bk3Rh/SKmOfd9co2rCLf0Voy4o7ECBOvw==
|
||||
"@types/filesystem@^0.0.32":
|
||||
version "0.0.32"
|
||||
resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.32.tgz#307df7cc084a2293c3c1a31151b178063e0a8edf"
|
||||
integrity sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==
|
||||
dependencies:
|
||||
"@types/filewriter" "*"
|
||||
|
||||
"@types/filewriter@*":
|
||||
version "0.0.28"
|
||||
resolved "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.28.tgz"
|
||||
integrity sha1-wFTor02d11205jq8dviFFocU1LM=
|
||||
version "0.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.29.tgz#a48795ecadf957f6c0d10e0c34af86c098fa5bee"
|
||||
integrity sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==
|
||||
|
||||
"@types/json-schema@^7.0.3":
|
||||
version "7.0.4"
|
||||
@ -8342,10 +8342,10 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@3.9.3:
|
||||
version "3.9.3"
|
||||
resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz"
|
||||
integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==
|
||||
typescript@^4.7.4:
|
||||
version "4.7.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
|
||||
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
|
||||
|
||||
uglify-js@3.4.x:
|
||||
version "3.4.10"
|
||||
|
Loading…
Reference in New Issue
Block a user