Skip to content

Commit

Permalink
fix issue types ShapeSourceProps onPress func #1659 (#1660)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonillajr authored and kristfal committed Sep 6, 2019
1 parent 21497f2 commit 004ed19
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.d.ts
Expand Up @@ -24,9 +24,9 @@ type Visibility = 'visible' | 'none'
type Alignment = 'map' | 'viewport';
type AutoAlignment = Alignment | 'auto';

type NamedStyles<T> = {
[P in keyof T]: SymbolLayerStyle | RasterLayerStyle | LineLayerStyle | FillLayerStyle |
FillExtrusionLayerStyle | CircleLayerStyle | BackgroundLayerStyle
type NamedStyles<T> = {
[P in keyof T]: SymbolLayerStyle | RasterLayerStyle | LineLayerStyle | FillLayerStyle |
FillExtrusionLayerStyle | CircleLayerStyle | BackgroundLayerStyle
};

declare namespace MapboxGL {
Expand Down Expand Up @@ -57,10 +57,10 @@ declare namespace MapboxGL {
class Light extends Component<LightProps> { }

class StyleSheet extends Component {
static create<T extends NamedStyles<T> | NamedStyles<any>>(styles: T): void;
camera(stops: {[key: number]: string}, interpolationMode?: InterpolationMode): void;
source(stops: {[key: number]: string}, attributeName: string, interpolationMode?: InterpolationMode): void;
composite(stops: {[key: number]: string}, attributeName: string, interpolationMode?: InterpolationMode): void;
static create<T extends NamedStyles<T> | NamedStyles<any>>(styles: T): void;
camera(stops: { [key: number]: string }, interpolationMode?: InterpolationMode): void;
source(stops: { [key: number]: string }, attributeName: string, interpolationMode?: InterpolationMode): void;
composite(stops: { [key: number]: string }, attributeName: string, interpolationMode?: InterpolationMode): void;

identity(attributeName: string): number;
}
Expand Down Expand Up @@ -365,7 +365,7 @@ interface ShapeSourceProps {
buffer?: number;
tolerance?: number;
images?: any;
onPress?: () => void;
onPress?: (e: any) => void;
hitbox?: any;
}

Expand Down

0 comments on commit 004ed19

Please sign in to comment.