Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RefactoringGuru/design-patterns-typescript
/ functions
Functions
581 in github.com/RefactoringGuru/design-patterns-typescript
⨍
Functions
581
◇
Types & classes
444
↓ 252 callers
Method
log
(message: string)
src/AbstractFactory/RealWorld/index.ts:71
↓ 13 callers
Method
addContact
(contact: Contact)
src/Iterator/RealWorld/index.ts:23
↓ 10 callers
Method
add
(packageComponent: PackageComponent)
src/Composite/RealWorld/index.ts:47
↓ 9 callers
Method
handle
(request: Request)
src/ChainOfResponsibility/RealWorld/index.ts:21
↓ 8 callers
Method
operation
()
src/Decorator/Conceptual/index.ts:21
↓ 6 callers
Method
add
* EN: A composite object can add or remove other components (both simple or * complex) to or from its child list. * * RU: Объект контей
src/Composite/Conceptual/index.ts:119
↓ 6 callers
Method
insertCoin
(_: Coin)
src/State/RealWorld/index.ts:159
↓ 6 callers
Method
notify
(sender: object, event: string, payload?: string)
src/Mediator/RealWorld/index.ts:14
↓ 5 callers
Method
selectProduct
(_: Product)
src/State/RealWorld/index.ts:162
↓ 5 callers
Method
showState
()
src/Memento/RealWorld/index.ts:49
↓ 4 callers
Method
add
(component: ComponentPrototype)
src/Prototype/RealWorld/index.ts:36
↓ 4 callers
Method
buildRoute
(origin: string, destination: string)
src/Strategy/Book/index.ts:2
↓ 4 callers
Method
getPrice
()
src/Composite/Book/index.ts:2
↓ 4 callers
Function
handleError
(error)
src/State/RealWorld/index.ts:195
↓ 4 callers
Method
process
(req: ControllerRequest)
src/Decorator/RealWorld/index.ts:17
↓ 4 callers
Method
publish
()
src/State/Book/index.ts:3
↓ 4 callers
Method
readFile
(filename: string)
src/Flyweight/RealWorld/index.ts:29
↓ 4 callers
Method
render
()
src/State/Book/index.ts:2
↓ 4 callers
Method
send
(message: string)
src/Decorator/Book/index.ts:2
↓ 4 callers
Method
transitionTo
* EN: The Context allows changing the State object at runtime.
src/State/RealWorld/index.ts:91
↓ 4 callers
Method
undo
()
src/Memento/RealWorld/index.ts:111
↓ 4 callers
Method
volumeDown
()
src/Observer/RealWorld/index.ts:35
↓ 4 callers
Method
volumeUp
()
src/Observer/RealWorld/index.ts:30
↓ 3 callers
Method
addItem
(item: string)
src/Iterator/Conceptual/index.ts:132
↓ 3 callers
Method
addItem
(item: Component)
src/Composite/Book/index.ts:18
↓ 3 callers
Method
addLine
(newLine: InvoiceLine)
src/TemplateMethod/RealWorld/index.ts:33
↓ 3 callers
Method
backup
()
src/Memento/Conceptual/index.ts:157
↓ 3 callers
Method
backup
()
src/Memento/RealWorld/index.ts:106
↓ 3 callers
Method
displayText
()
src/Memento/Book/index.ts:26
↓ 3 callers
Method
doSomething
* EN: The Originator's business logic may affect its internal state. * Therefore, the client should backup the state before launching methods of
src/Memento/Conceptual/index.ts:46
↓ 3 callers
Method
execute
()
src/Command/RealWorld/index.ts:15
↓ 3 callers
Method
getCount
()
src/Iterator/Conceptual/index.ts:128
↓ 3 callers
Method
getProduct
* EN: Concrete Builders are supposed to provide their own methods for * retrieving results. That's because various types of builders may create
src/Builder/Conceptual/index.ts:101
↓ 3 callers
Method
getProduct
()
src/Builder/RealWorld/index.ts:68
↓ 3 callers
Method
getVehicle
* EN: Checks if the external state exists in the cache, otherwise it * creates a new one and stores it for reusing in the future
src/Flyweight/RealWorld/index.ts:87
↓ 3 callers
Method
listParts
()
src/Builder/Conceptual/index.ts:126
↓ 3 callers
Method
operation
()
src/FactoryMethod/Conceptual/index.ts:97
↓ 3 callers
Method
publishMessage
(message: string)
src/Mediator/RealWorld/index.ts:30
↓ 3 callers
Method
request
()
src/Proxy/Conceptual/index.ts:25
↓ 3 callers
Method
setEmail
(email: string)
src/Builder/RealWorld/index.ts:29
↓ 3 callers
Method
setGender
(gender: Gender)
src/Builder/RealWorld/index.ts:36
↓ 3 callers
Method
setName
(name: string)
src/Builder/RealWorld/index.ts:21
↓ 3 callers
Method
setRouteStrategy
(strategy: RouteStrategy)
src/Strategy/Book/index.ts:26
↓ 3 callers
Method
setSurname
(surname: string)
src/Builder/RealWorld/index.ts:25
↓ 3 callers
Method
someBusinessLogic
* EN: Usually, the subscription logic is only a fraction of what a Subject * can really do. Subjects commonly hold some important business logic,
src/Observer/Conceptual/index.ts:123
↓ 3 callers
Method
transitionTo
* EN: The Context allows changing the State object at runtime. * * RU: Контекст позволяет изменять объект Состояния во время выполнения.
src/State/Conceptual/index.ts:39
↓ 2 callers
Method
accept
(visitor: Visitor)
src/Visitor/Conceptual/index.ts:20
↓ 2 callers
Function
addCarToPoliceDatabase
( ff: FlyweightFactory, plates: string, owner: string, brand: string, model: string, color: string, )
src/Flyweight/Conceptual/index.ts:117
↓ 2 callers
Method
addCredit
* EN: Some context public methods that the state will interact with
src/State/RealWorld/index.ts:52
↓ 2 callers
Method
attach
(observer: Observer)
src/Observer/Conceptual/index.ts:34
↓ 2 callers
Function
calculateCosts
* EN: The client code can be factored to reuse several visitors with the same * product set.
src/Visitor/RealWorld/index.ts:132
↓ 2 callers
Method
changeState
(state: State)
src/State/Book/index.ts:13
↓ 2 callers
Function
client
* EN: The client function receives a factory to produce what it needs to * execute the application. It's not concerned about the environment.
src/AbstractFactory/RealWorld/index.ts:122
↓ 2 callers
Function
clientCode
* EN: The client code works with all objects using the Component interface. * This way it can stay independent of the concrete classes of components
src/Decorator/Conceptual/index.ts:111
↓ 2 callers
Function
clientCode
* EN: The client code is usually suited to work with a single handler. In most * cases, it is not even aware that the handler is part of a chain. *
src/ChainOfResponsibility/Conceptual/index.ts:103
↓ 2 callers
Function
clientCode
* EN: The client code can run visitor operations over any set of elements * without figuring out their concrete classes. The accept operation directs
src/Visitor/Conceptual/index.ts:135
↓ 2 callers
Function
clientCode
* EN: The client code is supposed to work with all objects (both subjects and * proxies) via the Subject interface in order to support both real subj
src/Proxy/Conceptual/index.ts:112
↓ 2 callers
Function
clientCode
* EN: The client code works with real and proxied services
src/Proxy/RealWorld/index.ts:79
↓ 2 callers
Function
clientCode
* EN: The client code works with an instance of a concrete creator, albeit * through its base interface. As long as the client keeps working with the
src/FactoryMethod/Conceptual/index.ts:128
↓ 2 callers
Function
clientCode
* EN: The client code calls the template method to execute the algorithm. * Client code does not have to know the concrete class of an object it work
src/TemplateMethod/Conceptual/index.ts:136
↓ 2 callers
Function
clientCode
* EN: Except for the initialization phase, where an Abstraction object gets * linked with a specific Implementation object, the client code should on
src/Bridge/Conceptual/index.ts:108
↓ 2 callers
Function
clientCode
* EN: The client code works with factories and products only through abstract * types: AbstractFactory and AbstractProduct. This lets you pass any fa
src/AbstractFactory/Conceptual/index.ts:184
↓ 2 callers
Function
clientCode
* EN: The client code supports all classes that follow the Target interface. * * RU: Клиентский код поддерживает все классы, использующие целевой ин
src/Adapter/Conceptual/index.ts:66
↓ 2 callers
Function
clientCode
* EN: The client code works with all of the components via the base interface. * * RU: Клиентский код работает со всеми компонентами через базовый и
src/Composite/Conceptual/index.ts:161
↓ 2 callers
Method
clone
()
src/Prototype/RealWorld/index.ts:14
↓ 2 callers
Method
connect
()
src/AbstractFactory/RealWorld/index.ts:35
↓ 2 callers
Method
constructHouse
()
src/Builder/Book/index.ts:118
↓ 2 callers
Function
createFurniture
(factory: FurnitureFactory)
src/AbstractFactory/Book/index.ts:73
↓ 2 callers
Method
deliver
()
src/FactoryMethod/Book/index.ts:2
↓ 2 callers
Method
describeHouse
()
src/Builder/Book/index.ts:28
↓ 2 callers
Method
doC
()
src/Mediator/Conceptual/index.ts:100
↓ 2 callers
Method
doSomeBusinessLogic
* EN: The Context delegates some work to the Strategy object instead of * implementing multiple versions of the algorithm on its own. *
src/Strategy/Conceptual/index.ts:59
↓ 2 callers
Method
editText
(newText: string)
src/Memento/Book/index.ts:22
↓ 2 callers
Method
exclusiveMethodOfConcreteComponentA
* EN: Concrete Components may have special methods that don't exist in * their base class or interface. The Visitor is still able to use these
src/Visitor/Conceptual/index.ts:54
↓ 2 callers
Method
getItems
()
src/Iterator/Conceptual/index.ts:124
↓ 2 callers
Method
getKey
* EN: Returns a Flyweight's string hash for a given state. * * RU: Возвращает хеш строки Легковеса для данного состояния.
src/Flyweight/Conceptual/index.ts:65
↓ 2 callers
Method
getName
()
src/Memento/Book/index.ts:2
↓ 2 callers
Method
getRenderedItem
()
src/Bridge/RealWorld/index.ts:41
↓ 2 callers
Method
getResult
()
src/Builder/Book/index.ts:44
↓ 2 callers
Method
isCommand
(object)
src/Command/Conceptual/index.ts:153
↓ 2 callers
Method
listFlyweights
()
src/Flyweight/Conceptual/index.ts:89
↓ 2 callers
Function
main
* EN: The client function accepts any concrete factory
src/FactoryMethod/RealWorld/index.ts:68
↓ 2 callers
Method
next
()
src/Iterator/Conceptual/index.ts:22
↓ 2 callers
Method
operation1
()
src/Facade/Conceptual/index.ts:74
↓ 2 callers
Method
operationImplementation
()
src/Bridge/Conceptual/index.ts:75
↓ 2 callers
Method
planDelivery
()
src/FactoryMethod/Book/index.ts:41
↓ 2 callers
Method
producePartA
()
src/Builder/Conceptual/index.ts:23
↓ 2 callers
Method
raiseSalaryTo
(newSalary: number)
src/Memento/RealWorld/index.ts:28
↓ 2 callers
Method
request
()
src/Proxy/RealWorld/index.ts:13
↓ 2 callers
Method
reset
()
src/Builder/Conceptual/index.ts:51
↓ 2 callers
Method
reset
()
src/Builder/RealWorld/index.ts:81
↓ 2 callers
Method
setAddress
( streetName: string, number: number, city: string, zipCode: string, country: st
src/Builder/RealWorld/index.ts:40
↓ 2 callers
Method
setDoors
(doors: number)
src/Builder/Book/index.ts:12
↓ 2 callers
Method
setIsAdmin
(isAdmin: boolean)
src/Builder/RealWorld/index.ts:49
↓ 2 callers
Method
setMediator
(mediator: Mediator)
src/Mediator/Conceptual/index.ts:74
↓ 2 callers
Method
setNext
(handler: Handler<Request, Result>)
src/ChainOfResponsibility/RealWorld/index.ts:19
↓ 2 callers
Method
setPhoneNumber
(phoneNumber: string)
src/Builder/RealWorld/index.ts:53
↓ 2 callers
Method
setRoof
(roof: string)
src/Builder/Book/index.ts:20
↓ 2 callers
Method
setSwimmingPool
(swimmingPool: boolean)
src/Builder/Book/index.ts:24
↓ 2 callers
Method
setText
(text: string)
src/Prototype/RealWorld/index.ts:80
next →
1–100 of 581, ranked by callers