mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Use a narrower type.
This commit is contained in:
Vendored
+5
-3
@@ -5,6 +5,8 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
export type PossiblyFuncOfHrefAndType<T> =
|
||||
| T
|
||||
| ((href: string, type: string) => T);
|
||||
@@ -27,9 +29,9 @@ export interface LinkifyOptions {
|
||||
* Also accepts a function that takes the unformatted href, the link type
|
||||
* (e.g., 'url', 'email', etc.) and returns the object.
|
||||
*/
|
||||
attributes?: PossiblyFuncOfHrefAndType<{
|
||||
[attrName: string]: any;
|
||||
}> | null;
|
||||
attributes?: PossiblyFuncOfHrefAndType<
|
||||
React.AnchorHTMLAttributes<HTMLAnchorElement>
|
||||
> | null;
|
||||
|
||||
/**
|
||||
* className
|
||||
|
||||
Reference in New Issue
Block a user