Skip to content

Commit 8c6e06f

Browse files
committed
fix type issue
1 parent dcc6eaf commit 8c6e06f

3 files changed

Lines changed: 10 additions & 36 deletions

File tree

package-lock.json

Lines changed: 4 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/src/lib/addons/create_addon.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export default async function (
6666
ux.stdout(formatConfigVarsMessage(addon))
6767
} else {
6868
ux.stdout(`${color.addon(addon.name || '')} is being created in the background. The app will restart when complete...`)
69-
if (utils.pg.isAdvancedDatabase(addon))
69+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
70+
if (utils.pg.isAdvancedDatabase(addon as any))
7071
ux.stdout(`Run ${color.code('heroku data:pg:info ' + addon.name + ' -a ' + addon.app!.name)} to check creation progress.`)
7172
else
7273
ux.stdout(`Run ${color.code('heroku addons:info ' + addon.name)} to check creation progress.`)

packages/cli/src/lib/addons/destroy_addon.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export default async function (heroku: APIClient, addon: Heroku.AddOn, force = f
1616
headers: {'Accept-Expansion': 'plan'},
1717
}).catch(error => {
1818
const errorMessage = error.body?.message || error
19-
if (utils.pg.isAdvancedDatabase(addon)) {
19+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
20+
if (utils.pg.isAdvancedDatabase(addon as any)) {
2021
throw new Error(`We can't destroy your database due to an error: ${errorMessage}. Try again or open a ticket with Heroku Support: https://help.heroku.com/`)
2122
} else {
2223
throw new Error(`The add-on was unable to be destroyed: ${errorMessage}.`)
@@ -45,7 +46,8 @@ export default async function (heroku: APIClient, addon: Heroku.AddOn, force = f
4546
ux.stdout(`Run ${color.code('heroku addons:info ' + addonName)} to check destruction progress`)
4647
}
4748
} else if (addonResponse.state !== 'deprovisioned') {
48-
if (utils.pg.isAdvancedDatabase(addonResponse)) {
49+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
50+
if (utils.pg.isAdvancedDatabase(addonResponse as any)) {
4951
throw new Error(`You can't destroy a database with a ${addonResponse.state} status.`)
5052
} else {
5153
throw new Error(`The add-on was unable to be destroyed, with status ${addonResponse.state}.`)

0 commit comments

Comments
 (0)