Skip to content
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

feat: propagate types when using connect function #61

Merged
merged 3 commits into from
Aug 30, 2021

Conversation

0xGorilla
Copy link
Member

Description
Closes #60

@0xGorilla 0xGorilla changed the title feat: connect function leaves type propagation feat: propagate types when using connect function Aug 30, 2021
src/types.ts Outdated
wallet: Signer;
fallback: ProgrammableContractFunction;
setVariable: EditableStorageLogic['setVariable'];
export type FakeContract<T extends BaseContract> = SmockContractBase<T> & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this T extends BaseContract = BaseContract

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, great!

src/types.ts Outdated
[Property in keyof T['functions']]: ProgrammableContractFunction;
};

export type MockContract<T extends BaseContract> = SmockContractBase<T> & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

@0xGorilla 0xGorilla merged commit d263e43 into main Aug 30, 2021
@0xGorilla 0xGorilla deleted the feat/connect-types branch August 30, 2021 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

connect function leaves types behind
2 participants