Skip to content

Commit 40a1301

Browse files
committed
TS 3.7 changes related to microsoft/TypeScript#33752
1 parent e070b87 commit 40a1301

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

packages/@ionic/utils-fs/src/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export async function getFileChecksums(p: string): Promise<[string, string | und
208208
}
209209
}
210210
})(),
211-
]);
211+
]) as Promise<[string, string | undefined]>; // TODO: https://github.com/microsoft/TypeScript/issues/33752
212212
}
213213

214214
/**
@@ -258,7 +258,10 @@ export async function pathExecutable(filePath: string): Promise<boolean> {
258258
}
259259

260260
export async function isExecutableFile(filePath: string): Promise<boolean> {
261-
const [ stats, executable ] = await Promise.all([safe.stat(filePath), pathExecutable(filePath)]);
261+
const [ stats, executable ] = await (Promise.all([
262+
safe.stat(filePath),
263+
pathExecutable(filePath),
264+
]) as Promise<[fs.Stats, boolean]>); // TODO: https://github.com/microsoft/TypeScript/issues/33752
262265

263266
return !!stats && (stats.isFile() || stats.isSymbolicLink()) && executable;
264267
}

packages/ionic/src/lib/integrations/capacitor/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parseArgs } from '@ionic/cli-framework';
1+
import { PackageJson, parseArgs } from '@ionic/cli-framework';
22
import { mkdirp } from '@ionic/utils-fs';
33
import * as path from 'path';
44

@@ -78,10 +78,10 @@ export class Integration extends BaseIntegration<ProjectIntegration> {
7878
const [
7979
[ capacitorCorePkg, capacitorCorePkgPath ],
8080
capacitorCLIVersion,
81-
] = await Promise.all([
81+
] = await (Promise.all([
8282
this.e.project.getPackageJson('@capacitor/core'),
8383
this.getCapacitorCLIVersion(),
84-
]);
84+
]) as Promise<[[PackageJson | undefined, string], string | undefined]>); // TODO: https://github.com/microsoft/TypeScript/issues/33752
8585

8686
const info: InfoItem[] = [
8787
{ group: 'capacitor', key: 'Capacitor CLI', value: capacitorCLIVersion || 'not installed' },

packages/ionic/src/lib/integrations/cordova/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ export class Integration extends BaseIntegration<ProjectIntegration> {
134134
iosDeploy,
135135
iosSim,
136136
androidSdkToolsVersion,
137-
] = await Promise.all([
137+
] = await (Promise.all([
138138
this.getCordovaVersion(),
139139
this.getCordovaPlatformVersions(),
140140
this.getCordovaPluginVersions(),
141141
this.getXcodebuildVersion(),
142142
this.getIOSDeployVersion(),
143143
this.getIOSSimVersion(),
144144
getAndroidSdkToolsVersion(),
145-
]);
145+
]) as Promise<[string | undefined, string, string, string | undefined, string | undefined, string | undefined, string | undefined]>); // TODO: https://github.com/microsoft/TypeScript/issues/33752
146146

147147
const info: InfoItem[] = [
148148
{ group: 'cordova', key: 'Cordova CLI', value: cordovaVersion || 'not installed' },

packages/ionic/src/lib/project/ionic1/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { PackageJson } from '@ionic/cli-framework';
12
import { prettyPath } from '@ionic/cli-framework/utils/format';
23
import { readJson } from '@ionic/utils-fs';
34
import * as Debug from 'debug';
@@ -41,10 +42,10 @@ export class Ionic1Project extends Project {
4142
const [
4243
ionic1Version,
4344
[ v1ToolkitPkg ],
44-
] = await Promise.all([
45+
] = await (Promise.all([
4546
this.getFrameworkVersion(),
4647
this.getPackageJson('@ionic/v1-toolkit'),
47-
]);
48+
]) as Promise<[string | undefined, [PackageJson | undefined, string]]>); // TODO: https://github.com/microsoft/TypeScript/issues/33752
4849

4950
return [
5051
...(await super.getInfo()),

0 commit comments

Comments
 (0)