Skip to content

The scripts/generate-clients.mjs module overloads call to createFromRoot from codama #109

Description

@beeman

The generate-clients script calls the createFromRoot method from codama with two parameters. However, the method seems to accept only one.

import * as c from 'codama'
import { rootNodeFromAnchor } from '@codama/nodes-from-anchor'
import { getAllProgramIdls } from './utils.mjs'

// Instantiate Codama.
const [idl, ...additionalIdls] = getAllProgramIdls().map((idl) =>
  rootNodeFromAnchor(require(idl)),
)
// ❌ The `createFromRoot` method only accepts 1 parameter
const codama = c.createFromRoot(idl, additionalIdls)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions