mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
constraint type parameter in Map and Pane
This commit is contained in:
parent
0ee8e83ae3
commit
4e4d4d3879
4
types/react-leaflet/index.d.ts
vendored
4
types/react-leaflet/index.d.ts
vendored
@ -143,7 +143,7 @@ export interface MapProps extends MapEvents, Leaflet.MapOptions, Leaflet.LocateO
|
||||
zoom?: number;
|
||||
}
|
||||
|
||||
export class Map<P = MapProps, E = Leaflet.Map> extends MapComponent<P, E> {
|
||||
export class Map<P extends MapProps = MapProps, E extends Leaflet.Map = Leaflet.Map> extends MapComponent<P, E> {
|
||||
className?: string;
|
||||
container: HTMLDivElement;
|
||||
getChildContext(): { layerContainer: E, map: E };
|
||||
@ -165,7 +165,7 @@ export interface PaneProps {
|
||||
export interface PaneState {
|
||||
name?: string;
|
||||
}
|
||||
export class Pane<P = PaneProps, S = PaneState> extends React.Component<P, S> {
|
||||
export class Pane<P extends PaneProps = PaneProps, S extends PaneState = PaneState> extends React.Component<P, S> {
|
||||
getChildContext(): { pane: string };
|
||||
createPane(props: P): void;
|
||||
removePane(): void;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user