DefinitelyTyped/types/google-apps-script/google-apps-script.language.d.ts
Grant Timmerman d9576a981b [@types/google-apps-script] Fixes #32585. Removes lib.d.ts. (#35730)
* [@types/google-apps-script] Fixes #32585. Removes lib.d.ts.

* [google-apps-script] Fixes conflicting Date class
2019-05-28 12:20:52 -07:00

26 lines
963 B
TypeScript

// Type definitions for Google Apps Script 2018-07-11
// 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;