diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/onceDefined.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/onceDefined.ts b/src/utils/onceDefined.ts index 4ee8fa6..dc0e169 100644 --- a/src/utils/onceDefined.ts +++ b/src/utils/onceDefined.ts @@ -27,7 +27,7 @@ import type { LiteralUnion } from "type-fest"; * * @example onceDefined(window, "webpackChunkdiscord_app", wpInstance => wpInstance.push(...)); */ -export function onceDefined<T, P extends LiteralUnion<keyof T, PropertyKey>>( +export function onceDefined<T extends object, P extends LiteralUnion<keyof T, PropertyKey>>( target: T, property: P, callback: (v: P extends keyof T ? T[P] : any) => void ): void { const propertyAsAny = property as any; |