Conform more of the codebase with noImplicitAny
and strictNullChecks
(#25174
* Conform more of the codebase with `noImplicitAny` and `strictNullChecks` * Fix tests * Update src/vector/app.tsx
This commit is contained in:
parent
a2da1eb79d
commit
f5b8bccb65
26 changed files with 265 additions and 211 deletions
|
@ -40,6 +40,8 @@ function getNormalizedAppVersion(version: string): string {
|
|||
}
|
||||
|
||||
export default class WebPlatform extends VectorBasePlatform {
|
||||
private static readonly VERSION = process.env.VERSION!; // baked in by Webpack
|
||||
|
||||
public constructor() {
|
||||
super();
|
||||
// Register service worker if available on this platform
|
||||
|
@ -101,7 +103,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
}
|
||||
|
||||
public getAppVersion(): Promise<string> {
|
||||
return Promise.resolve(getNormalizedAppVersion(process.env.VERSION));
|
||||
return Promise.resolve(getNormalizedAppVersion(WebPlatform.VERSION));
|
||||
}
|
||||
|
||||
public startUpdater(): void {
|
||||
|
@ -113,7 +115,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
//
|
||||
// Ideally, loading an old copy would be impossible with the
|
||||
// cache-control: nocache HTTP header set, but Firefox doesn't always obey it :/
|
||||
console.log("startUpdater, current version is " + getNormalizedAppVersion(process.env.VERSION));
|
||||
console.log("startUpdater, current version is " + getNormalizedAppVersion(WebPlatform.VERSION));
|
||||
this.pollForUpdate((version: string, newVersion: string) => {
|
||||
const query = parseQs(location);
|
||||
if (query.updated) {
|
||||
|
@ -144,7 +146,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
): Promise<UpdateStatus> => {
|
||||
return this.getMostRecentVersion().then(
|
||||
(mostRecentVersion) => {
|
||||
const currentVersion = getNormalizedAppVersion(process.env.VERSION);
|
||||
const currentVersion = getNormalizedAppVersion(WebPlatform.VERSION);
|
||||
|
||||
if (currentVersion !== mostRecentVersion) {
|
||||
if (this.shouldShowUpdate(mostRecentVersion)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue