Skip to content

Commit 5edfa00

Browse files
committed
fix: make typescript shut up
1 parent a3d0b0f commit 5edfa00

File tree

1 file changed

+5
-2
lines changed
  • packages/@lwc/engine-core/src/framework

1 file changed

+5
-2
lines changed

packages/@lwc/engine-core/src/framework/utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,12 @@ export function shouldBeFormAssociated(Ctor: LightningElementConstructor) {
107107

108108
// check if a property is in an object, and if the object throws an error merely because we are
109109
// checking if the property exists, return false
110-
export function safeHasProp<T extends object, K extends PropertyKey>(obj: T, prop: K): obj is Record<K, unknown> {
110+
export function safeHasProp<K extends PropertyKey>(
111+
obj: unknown,
112+
prop: K
113+
): obj is Record<K, unknown> {
111114
try {
112-
return prop in obj;
115+
return prop in (obj as any);
113116
} catch (_err) {
114117
return false;
115118
}

0 commit comments

Comments
 (0)