Skip to content

Commit

Permalink
Fix types for .delete() to allow access by dot notation (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Jul 18, 2023
1 parent 217f062 commit 5b9a6e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ export default class Conf<T extends Record<string, any> = Record<string, unknown
@param key - The key of the item to delete.
*/
delete<Key extends keyof T>(key: Key): void {
delete<Key extends keyof T>(key: Key): void;
delete(key: string): void {
const {store} = this;
if (this.#options.accessPropertiesByDotNotation) {
deleteProperty(store, key as string);
Expand Down

0 comments on commit 5b9a6e3

Please sign in to comment.