Skip to content

Instantly share code, notes, and snippets.

Avatar

Tuğcan Karabörk tuucan

View GitHub Profile
@tuucan
tuucan / ChainOfResponsibility.ts
Last active Dec 19, 2019
Typescript implementation of chain of responsibility pattern
View ChainOfResponsibility.ts
interface Handler<T> {
setSuccessor: (successor: T) => void;
handle(...args: any): void;
}
/**
* Abstract base class for handlers
* hadnles setting and calling successors
* */