Add new "has" method

This commit is contained in:
Glen
2016-01-30 21:25:04 +02:00
parent b86d447665
commit 3467c722bd
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -78,6 +78,8 @@ evt.on("init", function () {
browserSync(config);
var has = browserSync.has("My server");
var bs = browserSync.create();
bs.init({
+5
View File
@@ -335,6 +335,11 @@ declare module "browser-sync" {
* @param name the identifier used for retrieval
*/
get(name: string): BrowserSyncInstance;
/**
* Check if an instance has been created.
* @param name the name of the instance
*/
has(name: string): boolean;
}
interface BrowserSyncInstance {