Skip to content

Commit 32e9081

Browse files
authored
Merge pull request #3495 from evertbouw/noPropertyAccessFromIndexSignature
fix syntax for users with noPropertyAccessFromIndexSignature enabled
2 parents 194177e + 127abd5 commit 32e9081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/toolkit/src/uncheckedindexed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// relies on remaining as a TS file, not .d.ts
33
type IfMaybeUndefined<T, True, False> = [undefined] extends [T] ? True : False
44

5-
const testAccess = ({} as Record<string, 0>).a
5+
const testAccess = ({} as Record<string, 0>)['a']
66

77
export type IfUncheckedIndexedAccess<True, False> = IfMaybeUndefined<
88
typeof testAccess,

0 commit comments

Comments
 (0)