[Canvas] Fix errant type in location Function (#37302) (#37543)

This commit is contained in:
Clint Andrew Hall 2019-05-30 17:30:08 -05:00 committed by GitHub
parent 54ec8b7685
commit 3459279749
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,12 +4,17 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { NullContextFunction } from '../types';
import { NullContextFunction, Datatable } from '../types';
import { getFunctionHelp } from '../../strings';
const noop = () => {};
export function location(): NullContextFunction<'location', {}, void> {
interface Return extends Datatable {
columns: [{ name: 'latitude'; type: 'number' }, { name: 'longitude'; type: 'number' }];
rows: [{ latitude: number; longitude: number }];
}
export function location(): NullContextFunction<'location', {}, Promise<Return>> {
const { help } = getFunctionHelp().location;
return {