Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

refactor: pattern rune #779

Merged
merged 7 commits into from
Mar 23, 2023
Merged

refactor: pattern rune #779

merged 7 commits into from
Mar 23, 2023

Conversation

harrysolovay
Copy link
Contributor

@harrysolovay harrysolovay commented Mar 22, 2023

Simplifies defining Capi Runes, as we no longer need to include the ctor (and it's somewhat intimidating signature).

Before

export class BlockRune<out C extends Chain, out U> extends Rune<known.SignedBlock, U> {
  constructor(
    _prime: BlockRune<C, U>["_prime"],
    readonly chain: ChainRune<C, U>,
    readonly hash: Rune<string, U>,
  ) {
    super(_prime)
  }
  // ...

After

export class BlockRune<out C extends Chain, out U>
  extends PatternRune<known.SignedBlock, C, U, Rune<string, U>>
{
  // ...

TODO: decide on name. PatternRune doesn't feel the most fitting.

@harrysolovay harrysolovay marked this pull request as ready for review March 22, 2023 18:54
@harrysolovay harrysolovay requested a review from tjjfvi as a code owner March 22, 2023 18:54
@deno-deploy deno-deploy bot requested a deployment to Preview March 23, 2023 14:59 Abandoned
@harrysolovay harrysolovay added this pull request to the merge queue Mar 23, 2023
Merged via the queue into main with commit 8183964 Mar 23, 2023
@harrysolovay harrysolovay deleted the pattern-rune branch March 23, 2023 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants