mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
Refactor (add MatchTest type and StreamOptions interface)
This commit is contained in:
1 parent
149185d2fa
commit
620f9cc215
1 file changed
+8
-1
Vendored
+8
-1
@@ -312,6 +312,13 @@ declare module "browser-sync" {
|
||||
fn: (match: string) => string;
|
||||
}
|
||||
|
||||
type MatchTest = (string | RegExp | ((testString: string) => boolean));
|
||||
|
||||
interface StreamOptions {
|
||||
once?: boolean;
|
||||
match?: MatchTest | MatchTest[];
|
||||
}
|
||||
|
||||
interface BrowserSyncStatic extends BrowserSyncInstance {
|
||||
/**
|
||||
* Start the Browsersync service. This will launch a server, proxy or start the snippet mode
|
||||
@@ -367,7 +374,7 @@ declare module "browser-sync" {
|
||||
* The stream method returns a transform stream and can act once or on many files.
|
||||
* @param opts Configuration for the stream method
|
||||
*/
|
||||
stream(opts?: { once?: boolean, match?: string | RegExp | ((testString: string) => boolean) | (string | RegExp | ((testString: string) => boolean))[] }): NodeJS.ReadWriteStream;
|
||||
stream(opts?: StreamOptions): NodeJS.ReadWriteStream;
|
||||
/**
|
||||
* Helper method for browser notifications
|
||||
* @param message Can be a simple message such as 'Connected' or HTML
|
||||
|
||||
Reference in new issue
Block a user