Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/TypeScript-Design-Patterns
/ functions
Functions
1,386 in github.com/PacktPublishing/TypeScript-Design-Patterns
⨍
Functions
1,386
◇
Types & classes
767
↓ 11 callers
Method
now
* Return a number representing the current time.
chapter-6/typings/jquery/jquery.d.ts:1108
↓ 8 callers
Method
val
* Get the current value of the first element in the set of matched elements.
chapter-6/typings/jquery/jquery.d.ts:1375
↓ 5 callers
Method
append
* Insert content, specified by the parameter, to the end of each element in the set of matched elements. * * param content1 DOM element,
chapter-6/typings/jquery/jquery.d.ts:2623
↓ 5 callers
Method
setOptions
($select: JQuery, values: string[])
chapter-5/src/mediator.ts:57
↓ 5 callers
Method
toString
(encoding?: string, start?: number, end?: number)
chapter-4/typings/node/node.d.ts:381
↓ 4 callers
Method
appendTo
(visitor: NodeVisitor)
chapter-6/src/visitor.ts:3
↓ 4 callers
Method
click
()
chapter-6/src/state.ts:4
↓ 4 callers
Method
draw
()
chapter-4/src/decorator.ts:12
↓ 4 callers
Method
get
(key: string)
chapter-4/src/adapter.ts:3
↓ 4 callers
Function
getRandomInteger
(max: number)
chapter-4/src/flyweight.ts:68
↓ 4 callers
Method
map
* Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. * * @param
chapter-6/typings/jquery/jquery.d.ts:3018
↓ 4 callers
Method
render
(hover: boolean)
chapter-6/src/state.ts:3
↓ 4 callers
Method
slice
* Reduce the set of matched elements to a subset specified by a range of indices. * * @param start An integer indicating the 0-based posi
chapter-6/typings/jquery/jquery.d.ts:3171
↓ 3 callers
Method
apply
* Implementation of how changes should be applied to the client-side * store.
chapter-2/src/after/client.ts:48
↓ 3 callers
Method
emit
(event: string, ...args: any[])
chapter-4/typings/node/node.d.ts:185
↓ 3 callers
Method
execute
(index: number, text: string)
chapter-5/src/command.ts:26
↓ 3 callers
Method
indexOf
(value: string | number | Buffer, byteOffset?: number)
chapter-4/typings/node/node.d.ts:425
↓ 3 callers
Method
on
(event: string, listener: Function)
chapter-4/typings/node/node.d.ts:225
↓ 3 callers
Method
refuel
(level: number)
chapter-3/src/builder.ts:93
↓ 3 callers
Method
render
(hover: boolean)
chapter-6/src/state.ts:63
↓ 3 callers
Method
then
* Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to de
chapter-6/typings/jquery/jquery.d.ts:183
↓ 2 callers
Method
_get
(identifiers: string[])
chapter-6/src/observer.ts:13
↓ 2 callers
Method
addClass
* Adds the specified class(es) to each of the set of matched elements. * * @param className One or more space-separated classes to be adde
chapter-6/typings/jquery/jquery.d.ts:1228
↓ 2 callers
Method
applyChange
* Method `applyChange` here is actually a refactored version of `update` * in the previous one. In this version, instead of `if` branches, we us
chapter-2/src/after/client.ts:219
↓ 2 callers
Function
buildPacket
(data: any)
chapter-7/src/event-based-parser.ts:83
↓ 2 callers
Method
change
* Trigger the "change" event on an element.
chapter-6/typings/jquery/jquery.d.ts:1946
↓ 2 callers
Method
consume
(count: number)
chapter-7/src/event-based-parser.ts:78
↓ 2 callers
Method
createRocket
()
chapter-3/src/abstract-factory.ts:22
↓ 2 callers
Method
filter
* Reduce the set of matched elements to those that match the selector or pass the function's test. * * @param selector A string containin
chapter-6/typings/jquery/jquery.d.ts:2926
↓ 2 callers
Method
handle
(request: Request)
chapter-5/src/chain-of-responsibility.ts:43
↓ 2 callers
Method
on
* Attach an event handler function for one or more events to the selected elements. * * @param events One or more space-separated event ty
chapter-6/typings/jquery/jquery.d.ts:2302
↓ 2 callers
Method
parse
()
chapter-7/src/event-based-parser.ts:22
↓ 2 callers
Method
put
(uri: string, options?: TOptions, callback?: RequestCallback)
chapter-6/typings/request/request.d.ts:39
↓ 2 callers
Method
reject
* Reject a Deferred object and call any failCallbacks with the given args. * * @param args Optional arguments that are passed to the fail
chapter-6/typings/jquery/jquery.d.ts:405
↓ 2 callers
Method
removeClass
* Remove a single class, multiple classes, or all classes from each element in the set of matched elements. * * @param className One or mo
chapter-6/typings/jquery/jquery.d.ts:1336
↓ 2 callers
Method
write
(buffer: Buffer)
chapter-4/typings/node/node.d.ts:1082
↓ 1 callers
Method
addPayload
(satellite: Satellite)
chapter-3/src/builder.ts:142
↓ 1 callers
Method
addStages
()
chapter-3/src/builder.ts:146
↓ 1 callers
Method
address
()
chapter-4/typings/node/node.d.ts:1099
↓ 1 callers
Method
append
* Implementation of how client-side changes should be appended to the * change list. For example, it may control whether to combine current
chapter-2/src/after/client.ts:43
↓ 1 callers
Method
appendBold
(text: BoldText)
chapter-6/src/visitor.ts:8
↓ 1 callers
Method
appendChangeToChangeList
* Append a specific change to the client-side change list that will be * synchronized to the server. * * @param id ID of the item to
chapter-2/src/after/client.ts:156
↓ 1 callers
Method
appendListItem
(item: ListItem)
chapter-6/src/visitor.ts:10
↓ 1 callers
Method
appendText
(text: Text)
chapter-6/src/visitor.ts:7
↓ 1 callers
Method
appendUnorderedList
(list: UnorderedList)
chapter-6/src/visitor.ts:9
↓ 1 callers
Method
apply
* @param item Target data item to apply the change to. * @param list List of changes that sent from the client. * @return A boolean indica
chapter-2/src/after/server.ts:46
↓ 1 callers
Method
applyChangeToDataItem
* Apply a specific change to the data item in client-side store. * * @param id ID of the item to apply this change to. * @param type
chapter-2/src/after/client.ts:186
↓ 1 callers
Method
applyClientChangeList
* Apply changes in the change list to a item in store. * * Instead of `if` branches, we use predefined strategies that match * speci
chapter-2/src/after/server.ts:126
↓ 1 callers
Method
applyClientChanges
* Apply client changes to items in store, it calls `applyClientChangeList` * to update specific items. * * @param changeLists Change
chapter-2/src/after/server.ts:171
↓ 1 callers
Method
applySyncingResponse
* Apply the response of a synchronizing request to the client, and keep * the client-side data up-to-date. * * @param response Respo
chapter-2/src/after/client.ts:112
↓ 1 callers
Function
bar
()
chapter-5/src/chain-of-responsibility.ts:12
↓ 1 callers
Function
biu
()
chapter-5/src/chain-of-responsibility.ts:24
↓ 1 callers
Method
click
()
chapter-6/src/state.ts:67
↓ 1 callers
Method
connect
(port: number, host?: string, connectionListener?: Function)
chapter-4/typings/node/node.d.ts:1088
↓ 1 callers
Method
copy
(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number)
chapter-4/typings/node/node.d.ts:386
↓ 1 callers
Method
createPayload
()
chapter-3/src/abstract-factory.ts:23
↓ 1 callers
Method
createPayload
()
chapter-3/src/factory-method.ts:42
↓ 1 callers
Method
createRocket
()
chapter-3/src/factory-method.ts:38
↓ 1 callers
Method
createStages
()
chapter-3/src/abstract-factory.ts:24
↓ 1 callers
Method
createStages
()
chapter-3/src/factory-method.ts:46
↓ 1 callers
Method
drawImage
(src: string)
chapter-4/src/bridge.ts:4
↓ 1 callers
Method
drawText
(text: string)
chapter-4/src/bridge.ts:5
↓ 1 callers
Method
empty
* Remove all child nodes of the set of matched elements from the DOM.
chapter-6/typings/jquery/jquery.d.ts:2670
↓ 1 callers
Method
equal
(act: any, exp: any, msg?: string)
chapter-1/typings/chai/chai.d.ts:256
↓ 1 callers
Method
error
* Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) * * @param handler A function to execute when the event i
chapter-6/typings/jquery/jquery.d.ts:2579
↓ 1 callers
Function
foo
()
chapter-5/src/chain-of-responsibility.ts:2
↓ 1 callers
Method
getAll
()
chapter-2/src/after/server.ts:73
↓ 1 callers
Method
getChangedItems
* Get changed items from server-side, usually items updated by other * clients. * * @param lastTimestamp The timestamp from client t
chapter-2/src/after/server.ts:103
↓ 1 callers
Method
getCitiesByCountryAndProvince
(country: string, province: string)
chapter-5/src/mediator.ts:77
↓ 1 callers
Method
getClientValue
* This method is for data type like 'set', of which the data is stored as * a hash set on server but expected to be an array on client. *
chapter-2/src/after/server.ts:58
↓ 1 callers
Method
getCountries
()
chapter-5/src/mediator.ts:69
↓ 1 callers
Method
getProvincesByCountry
(country: string)
chapter-5/src/mediator.ts:73
↓ 1 callers
Function
hello
(name: string)
chapter-1/src/index.ts:3
↓ 1 callers
Method
hover
* Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. * * @param handlerIn A
chapter-6/typings/jquery/jquery.d.ts:2060
↓ 1 callers
Method
isFile
()
chapter-4/typings/node/node.d.ts:1180
↓ 1 callers
Method
listen
(port: number, hostname?: string, backlog?: number, callback?: Function)
chapter-4/typings/node/node.d.ts:497
↓ 1 callers
Method
onclick
()
chapter-6/src/state.ts:71
↓ 1 callers
Method
open
(name: string)
chapter-4/src/adapter.ts:13
↓ 1 callers
Method
operationX
(target: TTarget)
chapter-6/src/strategy.ts:19
↓ 1 callers
Method
operationY
(target: TTarget)
chapter-6/src/strategy.ts:20
↓ 1 callers
Method
parseBody
()
chapter-7/src/event-based-parser.ts:55
↓ 1 callers
Method
parseHeader
()
chapter-7/src/event-based-parser.ts:43
↓ 1 callers
Method
prepareSyncingRequest
* Prepare synchronizing request that contains data to the server which * describes changes made from this client. * * @return The ge
chapter-2/src/after/client.ts:78
↓ 1 callers
Method
prepareSyncingResponse
* Prepare the synchronizing response to the client. * * @param lastTimestamp The timestamp from client that distinguishes * changes
chapter-2/src/after/server.ts:205
↓ 1 callers
Method
readAllBytes
()
chapter-6/src/template-method.ts:32
↓ 1 callers
Method
readUInt32BE
(offset: number, noAssert?: boolean)
chapter-4/typings/node/node.d.ts:400
↓ 1 callers
Method
resolve
(id:string)
chapter-4/typings/node/node.d.ts:48
↓ 1 callers
Method
restore
(state: State)
chapter-5/src/momento.ts:11
↓ 1 callers
Method
set
(key: string, value: T)
chapter-4/src/adapter.ts:4
↓ 1 callers
Method
setColor
(color: string)
chapter-4/src/decorator.ts:9
↓ 1 callers
Method
setFont
(font: string)
chapter-4/src/decorator.ts:10
↓ 1 callers
Method
should
()
chapter-1/typings/chai/chai.d.ts:16
↓ 1 callers
Method
text
* Get the combined text contents of each element in the set of matched elements, including their descendants.
chapter-6/typings/jquery/jquery.d.ts:2737
↓ 1 callers
Method
throw
(fn: Function, msg?: string)
chapter-1/typings/chai/chai.d.ts:332
↓ 1 callers
Method
toString
()
chapter-6/typings/request/request.d.ts:257
↓ 1 callers
Method
toggleClass
* Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the swi
chapter-6/typings/jquery/jquery.d.ts:1357
↓ 1 callers
Method
updateCityOptions
()
chapter-5/src/mediator.ts:41
↓ 1 callers
Method
updateProvinceOptions
()
chapter-5/src/mediator.ts:32
↓ 1 callers
Method
writeUInt32BE
(value: number, offset: number, noAssert?: boolean)
chapter-4/typings/node/node.d.ts:414
Method
Callbacks
* A multi-purpose callbacks list object that provides a powerful way to manage callback lists. * * @param flags An optional list of space-
chapter-5/typings/jquery/jquery.d.ts:730
next →
1–100 of 1,386, ranked by callers