Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 8df18cd

Browse files
committed
Fix upcoming TS 4.7 warning about Symbol coercion
1 parent 967d028 commit 8df18cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/@glimmer/tracking/src/tracked.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ function descriptorForField<T extends object, K extends keyof T>(
121121
): PropertyDescriptor {
122122
if (DEBUG && desc && (desc.value || desc.get || desc.set)) {
123123
throw new Error(
124-
`You attempted to use @tracked on ${key}, but that element is not a class field. @tracked is only usable on class fields. Native getters and setters will autotrack add any tracked fields they encounter, so there is no need mark getters and setters with @tracked.`
124+
`You attempted to use @tracked on ${String(
125+
key
126+
)}, but that element is not a class field. @tracked is only usable on class fields. Native getters and setters will autotrack add any tracked fields they encounter, so there is no need mark getters and setters with @tracked.`
125127
);
126128
}
127129

0 commit comments

Comments
 (0)