Getting Started
Writing content
API Documentation
Customization
Recipes
API References Develop
@ng-doc/builder / Function

watchFile

Function to watch a specific file for changes.

Presentation

function watchFile(
  filePath: string,
  type?: EventType | EventType[] | undefined,
): Observable<Event>;

Returns

Observable<Event> -

{Observable<watcher.Event>} - An Observable that emits an event whenever the file changes.

Parameters

NameTypeDescription
filePath
string
type
EventType | EventType[] | undefined

The type of event to watch for.