Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Class based middleware #64

Open
kyleect opened this issue Aug 25, 2019 · 0 comments
Open

Class based middleware #64

kyleect opened this issue Aug 25, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@kyleect
Copy link
Member

kyleect commented Aug 25, 2019

abstract class BaseMiddleware {
  call(this, setup: Setup, events?: EventEmitter) {
    // run middleware...
  }

  abstract setup(setup: Setup, events?: EventEmitter);
  results(results: Results) {};
}

class CustomMiddleware extends BaseMiddleware {
  setup(setup: Setup, events?: EventEmitter) {
    // setup stuff...
  }
  results(results: Results) {
    // results stuff...
  }
}
@kyleect kyleect added the enhancement New feature or request label Aug 25, 2019
@kyleect kyleect changed the title Class based middlewear Class based middleware Oct 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant