diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-08-13 02:11:38 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-08-13 02:11:38 -0400 |
commit | 2ed0c3e1203794ddaa0b17ed908432582d0198d1 (patch) | |
tree | 75627d2766f4c23192992ff0fcf54e229474ecc2 /src/client/apis/google_docs/GoogleApiClientUtils.ts | |
parent | 278cabf67a77edb3dd3bd9bb392550eeb08ab910 (diff) |
reading options
Diffstat (limited to 'src/client/apis/google_docs/GoogleApiClientUtils.ts')
-rw-r--r-- | src/client/apis/google_docs/GoogleApiClientUtils.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/apis/google_docs/GoogleApiClientUtils.ts b/src/client/apis/google_docs/GoogleApiClientUtils.ts index 71e5e1073..5e974b2e7 100644 --- a/src/client/apis/google_docs/GoogleApiClientUtils.ts +++ b/src/client/apis/google_docs/GoogleApiClientUtils.ts @@ -110,9 +110,14 @@ export namespace GoogleApiClientUtils { } }; - export const Read = async (documentId: string, removeNewlines = false): Promise<Opt<string>> => { - return Retrieve(documentId).then(schema => { - return schema ? Utils.extractText(schema, removeNewlines) : undefined; + export interface ReadOptions { + documentId: string; + removeNewlines?: boolean; + } + + export const Read = async (options: ReadOptions): Promise<Opt<string>> => { + return Retrieve(options.documentId).then(schema => { + return schema ? Utils.extractText(schema, options.removeNewlines) : undefined; }); }; |