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

This commit is contained in:
Clint Andrew Hall 2019-05-30 15:01:05 -05:00 committed by GitHub
parent c50b6aba70
commit 8dd30f6efc
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 {