Function readRegistryKey
- readRegistryKey<Key extends keyof RegistryKeys>(
key: Key,
defaultValue?: RegistryKeys[Key],
opts?: { acceptInvalidKeyNames: boolean },
): Promise<RegistryKeys[Key]>Type Parameters
- Key extends keyof RegistryKeys
Parameters
- key: Key
OptionaldefaultValue: RegistryKeys[Key]Optionalopts: { acceptInvalidKeyNames: boolean }
Returns Promise<RegistryKeys[Key]>
- readRegistryKey<ExpectedType = never>(
key: string & KeyErrorForValueType<ExpectedType>,
defaultValue?: ExpectedType,
opts?: { acceptInvalidKeyNames: boolean },
): Promise<ExpectedType>read a registry key acceptInvalidKeyNames - set to accept invalid key names that HareScript used to accept. this option may be removed in the future so consider migrating all keys requiring this flag!
Type Parameters
- ExpectedType = never
Parameters
- key: string & KeyErrorForValueType<ExpectedType>
OptionaldefaultValue: ExpectedTypeOptionalopts: { acceptInvalidKeyNames: boolean }
Returns Promise<ExpectedType>
read a registry key acceptInvalidKeyNames - set to accept invalid key names that HareScript used to accept. this option may be removed in the future so consider migrating all keys requiring this flag!