@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

@param {string} filePath - The path of the file to watch.

type
EventType | EventType[] | undefined

@param type - The type of event to watch for.