@types/tail
Advanced tools
+23
-35
@@ -1,2 +0,2 @@ | ||
| // Type definitions for tail 2.0 | ||
| // Type definitions for tail 2.2 | ||
| // Project: https://github.com/lucagrulla/node-tail, https://www.lucagrulla.com/node-tail | ||
@@ -6,38 +6,26 @@ // Definitions by: Mike Linkovich <https://github.com/spacejack> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
| // TypeScript Version: 2.1 | ||
| declare namespace Tail { | ||
| interface TailOptions { | ||
| separator?: string | RegExp | null; | ||
| fromBeginning?: boolean; | ||
| fsWatchOptions?: Record<string, any>; | ||
| follow?: boolean; | ||
| logger?: any; | ||
| encoding?: string; | ||
| useWatchFile?: boolean; | ||
| flushAtEOF?: boolean; | ||
| } | ||
| export interface TailOptions { | ||
| separator?: string | RegExp | null; | ||
| fromBeginning?: boolean; | ||
| fsWatchOptions?: Record<string, any>; | ||
| follow?: boolean; | ||
| logger?: any; | ||
| encoding?: string; | ||
| useWatchFile?: boolean; | ||
| flushAtEOF?: boolean; | ||
| nLines?: number; | ||
| } | ||
| interface Tail { | ||
| /** Callback to listen for newlines appended to file */ | ||
| on(eventType: 'line', cb: (data: any) => void): void; | ||
| /** Error callback */ | ||
| on(eventType: 'error', cb: (error: any) => void): void; | ||
| /** Stop watching file */ | ||
| unwatch(): void; | ||
| /** Start watching file if previously stopped */ | ||
| watch(): void; | ||
| } | ||
| interface TailConstructor { | ||
| /** Creates a new Tail object that starts watching the specified file immediately. */ | ||
| new (filename: string, options?: TailOptions): Tail; | ||
| } | ||
| interface Static { | ||
| Tail: TailConstructor; | ||
| } | ||
| export class Tail { | ||
| /** Creates a new Tail object that starts watching the specified file immediately. */ | ||
| constructor(filename: string, options?: TailOptions); | ||
| /** Callback to listen for newlines appended to file */ | ||
| on(eventType: "line", cb: (data: any) => void): void; | ||
| /** Error callback */ | ||
| on(eventType: "error", cb: (error: any) => void): void; | ||
| /** Stop watching file */ | ||
| unwatch(): void; | ||
| /** Start watching file if previously stopped */ | ||
| watch(): void; | ||
| } | ||
| declare const Tail: Tail.Static; | ||
| export = Tail; |
+1
-1
| MIT License | ||
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
| Copyright (c) Microsoft Corporation. | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
| { | ||
| "name": "@types/tail", | ||
| "version": "2.0.0", | ||
| "version": "2.2.0", | ||
| "description": "TypeScript definitions for tail", | ||
@@ -27,4 +27,4 @@ "license": "MIT", | ||
| "dependencies": {}, | ||
| "typesPublisherContentHash": "5f6562aeb6e5149b5e8946e14678cd3a85e815b857dcdfba3b0db85687be5d7d", | ||
| "typeScriptVersion": "2.8" | ||
| "typesPublisherContentHash": "2b623736f5ae3c12c395faedba7016de873945d2daf1a0449b8adcb01355c486", | ||
| "typeScriptVersion": "3.5" | ||
| } |
+2
-2
@@ -11,3 +11,3 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Tue, 12 Nov 2019 00:26:24 GMT | ||
| * Last updated: Thu, 20 May 2021 21:01:46 GMT | ||
| * Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
| # Credits | ||
| These definitions were written by Mike Linkovich (https://github.com/spacejack), and Devin Davies (https://github.com/devindavies). | ||
| These definitions were written by [Mike Linkovich](https://github.com/spacejack), and [Devin Davies](https://github.com/devindavies). |
3621
-7.63%28
-24.32%