mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [google.script.client-side] Add types * [google.script.client-side] Put version and enable header lint rule
40 lines
1.6 KiB
TypeScript
40 lines
1.6 KiB
TypeScript
google.script.url.getLocation(location => {
|
|
location.hash; // $ExpectedType string
|
|
location.parameter; // $ExpectedType { [key: string]: string }
|
|
location.parameters; // $ExpectedType { [key: string]: ReadonlyArray<string> }
|
|
});
|
|
|
|
google.script.history.push(null);
|
|
google.script.history.push({ timestamp: Date.now() }, { foo: 'bar', fiz: 'baz' });
|
|
google.script.history.push({ timestamp: Date.now() }, { foo: ['bar', 'cat'], fiz: 'baz' }, 'anchor1');
|
|
|
|
google.script.history.replace(null);
|
|
google.script.history.replace({ timestamp: Date.now() }, { foo: 'bar', fiz: 'baz' });
|
|
google.script.history.replace({ timestamp: Date.now() }, { foo: ['bar', 'cat'], fiz: 'baz' }, 'anchor1');
|
|
|
|
google.script.history.setChangeHandler(e => {
|
|
e.state; // $ExpectedType google.script.history.State
|
|
e.location.hash; // $ExpectedType string
|
|
e.location.parameter; // $ExpectedType { [key: string]: string }
|
|
e.location.parameters; // $ExpectedType { [key: string]: ReadonlyArray<string> }
|
|
});
|
|
|
|
google.script.host.origin; // $ExpectType string
|
|
google.script.host.close();
|
|
google.script.host.editor.focus();
|
|
google.script.host.setHeight(450);
|
|
google.script.host.setWidth(300);
|
|
|
|
google.script.run.withSuccessHandler(() => {}).executeScript({ message: 'test for google.script.run' });
|
|
|
|
google.script.run
|
|
.withSuccessHandler(value => {})
|
|
.withFailureHandler(error => {})
|
|
.getEmail();
|
|
|
|
google.script.run
|
|
.withSuccessHandler((value, userObject) => {})
|
|
.withFailureHandler((error, userObject) => {})
|
|
.withUserObject({})
|
|
.getSomeData(Date.now(), { options: 'none' }, 'anchor1', true, null);
|