Skip to content

Commit

Permalink
Add loadAsync to Loader interface
Browse files Browse the repository at this point in the history
The `loadAsync` method on `THREE.Loader` was removed in three-types/three-ts-types#311, since there's no consistent type definition for it.

This fixes the situation by adding the `loadAsync` method here.
  • Loading branch information
Methuselah96 committed Feb 1, 2023
1 parent 5f51f8d commit 10c418b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/fiber/src/core/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface Loader<T> extends THREE.Loader {
onProgress?: (event: ProgressEvent) => void,
onError?: (event: ErrorEvent) => void,
): unknown
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<T>
}

export type LoaderProto<T> = new (...args: any) => Loader<T extends unknown ? any : T>
Expand Down

0 comments on commit 10c418b

Please sign in to comment.