Skip to content

Commit

Permalink
refactor: rename Options interface to HafConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuhanW committed Dec 29, 2023
1 parent 88630e4 commit 327597b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { pathExistsSync, readJsonSync, writeJsonSync, removeSync } from 'fs-extr
import { getStorePath } from './get-store-path';
import type { FlattenedWithDotNotation, OptionalKeysOf, StringKeysOf, ArrayKeysOf } from './types';

interface Options<Schema> {
interface HafConfig<Schema> {
name: string;
extension?: string;
defaultSchema?: Partial<Schema>;
Expand All @@ -13,9 +13,9 @@ class Haf<Schema, FlattenedSchema = FlattenedWithDotNotation<Schema>> {
private storePath: string;
private defaultSchema: Partial<Schema>;

constructor(options: Options<Schema>) {
this.storePath = getStorePath(options.name, options.extension);
this.defaultSchema = options.defaultSchema ?? {};
constructor(config: HafConfig<Schema>) {
this.storePath = getStorePath(config.name, config.extension);
this.defaultSchema = config.defaultSchema ?? {};

this.initializeStore();
}
Expand Down

0 comments on commit 327597b

Please sign in to comment.