Skip to content

Commit

Permalink
Fix #220. Fix type defs: omit in class methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasturiano committed Dec 5, 2024
1 parent 068c67d commit 5f6d85d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ type PointerEventsFilterFn = (object: Object3D, data?: object) => boolean;
// don't surface these internal props from inner ThreeGlobe
type ExcludedInnerProps = 'setPointOfView' | 'pauseAnimation' | 'resumeAnimation';

export declare class GlobeGeneric<ChainableInstance>
export interface GlobeGenericInstance<ChainableInstance>
extends Omit<ThreeGlobeGeneric<ChainableInstance>, ExcludedInnerProps> {
constructor(element: HTMLElement, configOptions?: ConfigOptions);

resetProps(): ChainableInstance;
_destructor(): void;
Expand Down Expand Up @@ -126,6 +125,10 @@ export declare class GlobeGeneric<ChainableInstance>
toGlobeCoords(x: number, y: number): { lat: number, lng: number} | null;
}

declare class Globe extends GlobeGeneric<Globe> {}
export type GlobeInstance = GlobeGenericInstance<GlobeInstance>;

interface Globe {
new(element: HTMLElement, configOptions?: ConfigOptions): GlobeInstance;
}

export default Globe;

0 comments on commit 5f6d85d

Please sign in to comment.