From cd9e2541db660bb37ae5fc53f412edbffd7248c5 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Sun, 18 Mar 2018 21:50:20 +0000 Subject: [PATCH 1/2] Removed undefined method for NightmareJS `userAgent()` isnt defined on type Nightmare in the JS version according to the error below. `useragent()` is defined and is probably what people want to use. ``` TypeError: nightmare.userAgent is not a function at login (/home/noah/Go/src/github.com/Strum355/UserBenchmark-Scraper/typescript/js/main.js:31:14) at Object. (/home/noah/Go/src/github.com/Strum355/UserBenchmark-Scraper/typescript/js/main.js:12:5) at Module._compile (module.js:649:30) at Object.Module._extensions..js (module.js:660:10) at Module.load (module.js:561:32) at tryModuleLoad (module.js:501:12) at Function.Module._load (module.js:493:3) at Function.Module.runMain (module.js:690:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:666:3``` --- types/nightmare/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/nightmare/index.d.ts b/types/nightmare/index.d.ts index 061f22bd10..e848ce3fdd 100644 --- a/types/nightmare/index.d.ts +++ b/types/nightmare/index.d.ts @@ -12,7 +12,7 @@ declare class Nightmare { constructor(options?: Nightmare.IConstructorOptions); // Interact - userAgent(agent: string): Nightmare; + // userAgent(agent: string): Nightmare; end(): Nightmare; then(fn: (value: T) => R): Promise; halt(error: string, cb: () => void): Nightmare; From 386695a0cc5346b7ae76961b927e5bc2d021f381 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Mon, 26 Mar 2018 23:05:20 +0100 Subject: [PATCH 2/2] Removed userAgent() --- types/nightmare/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/nightmare/index.d.ts b/types/nightmare/index.d.ts index e848ce3fdd..923bcb6a37 100644 --- a/types/nightmare/index.d.ts +++ b/types/nightmare/index.d.ts @@ -12,7 +12,6 @@ declare class Nightmare { constructor(options?: Nightmare.IConstructorOptions); // Interact - // userAgent(agent: string): Nightmare; end(): Nightmare; then(fn: (value: T) => R): Promise; halt(error: string, cb: () => void): Nightmare;