Skip to content

Commit

Permalink
cli: Use ESM imports and annote provider type in the default migratio…
Browse files Browse the repository at this point in the history
…n script (#3234)

Co-authored-by: acheron <[email protected]>
  • Loading branch information
yashgo0018 and acheroncrypto authored Sep 10, 2024
1 parent 6145a87 commit 8a634c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/rust_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ pub fn ts_deploy_script() -> &'static str {
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@coral-xyz/anchor");
import * as anchor from "@coral-xyz/anchor";
module.exports = async function (provider) {
module.exports = async function (provider: anchor.AnchorProvider) {
// Configure client to use the provider.
anchor.setProvider(provider);
Expand Down

0 comments on commit 8a634c7

Please sign in to comment.