diff --git a/browser-sync/browser-sync-tests.ts b/browser-sync/browser-sync-tests.ts index 2d254ac3d..822c941d9 100644 --- a/browser-sync/browser-sync-tests.ts +++ b/browser-sync/browser-sync-tests.ts @@ -78,6 +78,8 @@ evt.on("init", function () { browserSync(config); +var has = browserSync.has("My server"); + var bs = browserSync.create(); bs.init({ diff --git a/browser-sync/browser-sync.d.ts b/browser-sync/browser-sync.d.ts index 58c1dbf65..50c00d9b9 100644 --- a/browser-sync/browser-sync.d.ts +++ b/browser-sync/browser-sync.d.ts @@ -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 {