When using platform.deployContract in typescript, a type error occurs.
Example:
import { ethers, platform } from "hardhat";
async function main() {
const ContractFactory = await ethers.getContractFactory("MyToken");
const instance = await platform.deployContract(ContractFactory);
await instance.deployed();
console.log(`Proxy deployed to ${instance.address}`);
}
cause type error:
Property 'deployContract' does not exist on type 'HardhatUpgrades'.