-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use TypeScript #40
use TypeScript #40
Conversation
import { useAtomValue } from 'jotai'; | ||
|
||
import AssetListItem from 'components/AssetListItem'; | ||
import ListItem from 'components/ListItem'; | ||
import SkeletonListItem from 'components/SkeletonListItem'; | ||
import { displayFunctionsAtom } from 'store/app'; | ||
|
||
// Ambient | ||
import '@agoric/ertp/src/types.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it appropriate to use import type
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally but the problem is the types needed are defined ambiently instead of in a module. We'll get there eventually but it's a lot more work Agoric/agoric-sdk#4560
src/store/app.ts
Outdated
import '@agoric/ertp/src/types'; | ||
import '@agoric/zoe/src/contractSupport'; | ||
import '@agoric/wallet-backend/src/types'; | ||
import { PursesJSONState } from '@agoric/wallet-backend'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have to be imported after the types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how line 11 got there. Maybe It should go back up to where it was as import type { PursesJSONState } from '@agoric/wallet-backend';
Deploying with Cloudflare Pages
|
Builds on recent work in Agoric/agoric-sdk#6500 to export types.
Where I'd like to get to is no need to manually define here any types here that come from agoric-sdk. There's more work to do but this at least drops
ertp.d.ts
and makes imports easier by using .ts syntax.