mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #14722 from DenisCarriere/patch-1
Extend Leaflet Util namespace
This commit is contained in:
Vendored
+21
@@ -1524,6 +1524,27 @@ declare namespace L {
|
||||
export const svg: boolean;
|
||||
}
|
||||
|
||||
export namespace Util {
|
||||
export function extend(dest: any, src?: any): any;
|
||||
export function create(proto: any, properties?: any): any;
|
||||
export function bind(fn: () => void, ...obj: any[]): () => void;
|
||||
export function stamp(obj: any): number;
|
||||
export function throttle(fn: () => void, time: number, context: any): () => void;
|
||||
export function wrapNum(num: number, range: number[], includeMax?: boolean): number;
|
||||
export function falseFn(): () => false;
|
||||
export function formatNum(num: number, digits?: number): number;
|
||||
export function trim(str: string): string;
|
||||
export function splitWords(str: string): string[];
|
||||
export function setOptions(obj: any, options: any): any;
|
||||
export function getParamString(obj: any, existingUrl?: string, uppercase?: boolean): string;
|
||||
export function template(str: string, data: any): string;
|
||||
export function isArray(obj: any): boolean;
|
||||
export function indexOf(array: any[], el: any): number;
|
||||
export function requestAnimFrame(fn: () => void, context?: any, immediate?: boolean): number;
|
||||
export function cancelAnimFrame(id: number): void;
|
||||
export let lastId: string;
|
||||
export let emptyImageUrl: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'leaflet' {
|
||||
|
||||
@@ -447,3 +447,22 @@ L.marker([1, 2], {
|
||||
iconUrl: 'my-icon.png'
|
||||
})
|
||||
}).bindPopup('<p>Hi</p>');
|
||||
|
||||
L.Util.extend({});
|
||||
L.Util.create({});
|
||||
L.Util.bind(() => {}, {});
|
||||
L.Util.stamp({});
|
||||
L.Util.throttle(() => {}, 123, {});
|
||||
L.Util.wrapNum(123, []);
|
||||
L.Util.falseFn();
|
||||
L.Util.formatNum(123);
|
||||
L.Util.trim('word ');
|
||||
L.Util.splitWords('word word');
|
||||
L.Util.setOptions({}, {});
|
||||
L.Util.getParamString({});
|
||||
L.Util.template('template', {});
|
||||
L.Util.isArray({});
|
||||
L.Util.indexOf([], {});
|
||||
L.Util.requestAnimFrame(() => {});
|
||||
L.Util.cancelAnimFrame(1);
|
||||
L.Util.emptyImageUrl;
|
||||
|
||||
Reference in New Issue
Block a user