Skip to content

Function: NOOP()

NOOP(): void

A no-operation function that does nothing and returns void. Useful as a default callback or placeholder function.

Returns

void

Example

typescript
function processData(data: any[], onComplete: () => void = NOOP) {
  // Process data...
  onComplete()
}

Released under the MIT License.