forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoogle-apps-script.language.d.ts
More file actions
25 lines (21 loc) · 966 Bytes
/
google-apps-script.language.d.ts
File metadata and controls
25 lines (21 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare namespace GoogleAppsScript {
export module Language {
/**
* The Language service provides scripts a way to compute automatic translations of text.
*
* // The code below will write "Esta es una prueba" to the log.
* var spanish = LanguageApp.translate('This is a test', 'en', 'es');
* Logger.log(spanish);
*/
export interface LanguageApp {
translate(text: string, sourceLanguage: string, targetLanguage: string): string;
translate(text: string, sourceLanguage: string, targetLanguage: string, advancedArgs: Object): string;
}
}
}
declare var LanguageApp: GoogleAppsScript.Language.LanguageApp;