From 81491cd70648eac5a320a37370eb5837f1a5b4b8 Mon Sep 17 00:00:00 2001 From: Nick Franken Date: Wed, 17 Jul 2019 15:11:41 -0500 Subject: [PATCH] fixed typings file --- index.d.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/index.d.ts b/index.d.ts index 10631a0..24ecffe 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,11 +1,12 @@ -interface R { - data(...args: any[]): R; - call(_opts?: R.Options): Promise; - callSync(_opts?: R.Options): object; -} -declare namespace R { +declare module '@fridgerator/r-script' { interface Options { - [key: string]: any; + [key: string]: any + } + + export class R { + constructor(path: string, env?: Options); + data (...args: any[]): R; + call (_opts?: Options): Promise; + callSync (_opts?: Options): object | undefined; } } -export = R;