Skip to content

Commit 1fad66e

Browse files
nolanlawsonwjhsf
andauthored
Update packages/@lwc/engine-core/src/framework/utils.ts
Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
1 parent 175aac7 commit 1fad66e

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ 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(obj: any, prop: string) {
110+
export function safeHasProp<T extends object, K extends PropertyKey>(obj: T, prop: K): obj is Record<K, unknown> {
111111
try {
112112
return prop in obj;
113113
} catch (_err) {

0 commit comments

Comments
 (0)