mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
fix/svg-argument-type (#37327)
This commit is contained in:
parent
9a962ba5ec
commit
0458df12b4
@ -4,7 +4,7 @@ import { sparkline } from '@fnando/sparkline';
|
||||
import * as sparkline2 from '@fnando/sparkline';
|
||||
import sparkline3 from '@fnando/sparkline';
|
||||
|
||||
const svg = document.createElement('svg') as any as SVGElement;
|
||||
const svg = document.createElement('svg') as any as SVGSVGElement;
|
||||
|
||||
// number entries
|
||||
sparkline(svg, [1, 2, 3]);
|
||||
|
||||
4
types/fnando__sparkline/index.d.ts
vendored
4
types/fnando__sparkline/index.d.ts
vendored
@ -49,7 +49,7 @@ type SparklineNonNativeOptions<TEntry> = SparklineOptions | SparklineOptionsFetc
|
||||
* @param entries You can either provide an array of numbers or an array of objects that respond to .value. If you have a different data structure, see options.fetch.
|
||||
* @param options This optional argument allows you to further customize the sparkline.
|
||||
*/
|
||||
export function sparkline<TEntry extends SparklineNativeEntry>(svg: SVGElement, entries: TEntry[], options?: SparklineNativeOptions<TEntry>): string;
|
||||
export function sparkline<TEntry>(svg: SVGElement, entries: TEntry[], options: SparklineNonNativeOptions<TEntry>): string;
|
||||
export function sparkline<TEntry extends SparklineNativeEntry>(svg: SVGSVGElement, entries: TEntry[], options?: SparklineNativeOptions<TEntry>): string;
|
||||
export function sparkline<TEntry>(svg: SVGSVGElement, entries: TEntry[], options: SparklineNonNativeOptions<TEntry>): string;
|
||||
|
||||
export default sparkline;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user