Coder Social home page Coder Social logo

Comments (5)

cgewecke avatar cgewecke commented on August 24, 2024 1

Yes, this is a breaking change in the release (0.1.0). These ambient d.ts types are no longer transpiled and bundled with the dist.

Instead you import them from a typechain folder included in the outer layer of the package.

import { Controller } from "@setprotocol/set-protocol-v2/typechain"

Does that pattern work for index-ui?

You can continue to import __factory files from the dist though, since those have to be transpiled to js

from set-protocol-v2.

cgewecke avatar cgewecke commented on August 24, 2024

There's a relevant issue about this at typechain 430

from set-protocol-v2.

rootulp avatar rootulp commented on August 24, 2024

I really appreciate the links and release notes, thanks for sharing! index-ui doesn't directly depend on any types from set-protocol-v2. Instead it takes a direct dependency on set.js. So I don't think we should be impacted by the ambient type location move. Is it possible that this problem is unique to the set-protocol-v2/dist/utils/contracts/index.js and would repro if set-protocol-v2 was used as a lib in any other context?

from set-protocol-v2.

cgewecke avatar cgewecke commented on August 24, 2024

Is it possible that this problem is unique to the set-protocol-v2/dist/utils/contracts/index.js and would repro if set-protocol-v2 was used as a lib in any other context

Yes, perhaps we could add some notes about our typechain distribution to the README.

I think including the folder as a non-dist asset is conventional in ethereum typechain projects atm...(saw that suggestion over there a while ago)

Ultimately, set.js consumes them this way in set.js PR 76 and looks like everything works.

from set-protocol-v2.

rootulp avatar rootulp commented on August 24, 2024

Disregard my earlier comment. SetProtocol/set.js#76 appears to resolve the issue I was encountering because when I build that PR locally, set.js is able to resolve the types in set-protocol-v2. Given the breaking change was called out in https://github.com/SetProtocol/set-protocol-v2/releases/tag/0.1.0, I'm comfortable closing this. Thanks for all of your help!

from set-protocol-v2.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.