Comments (5)
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.
There's a relevant issue about this at typechain 430
from set-protocol-v2.
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.
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.
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)
- Error HH8: There's one or more errors in your config file: HOT 2
- Error resolving ethers/lib/utils HOT 3
- Warnings for non-existent property 'INVALID_ALT_NUMBER' HOT 3
- Migrate from TSLint to ESLint HOT 1
- Upgrade to Typescript 4.x
- Resolve errors from hardhat-ethers HOT 1
- [UniswapPairPriceAdapter] getPrice check wrong address HOT 1
- Create issue in OpenZeppelin smart-contract-security-registry
- indexed keyword between BasicIssuanceModule and CustomOracleNavIssuanceModule are different
- Berlin vs. Istanbul gas cost changes
- Unknown type: ICErc20 when been compiled HOT 1
- Optimism Client revert response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from set-protocol-v2.