Skip to content

Commit 21ec2d6

Browse files
authored
Merge pull request bcherny#102 from grantila/optionalities
Fixed options object to be partial
2 parents 98e1127 + 08b9caa commit 21ec2d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const DEFAULT_OPTIONS: Options = {
4242

4343
export function compileFromFile(
4444
filename: string,
45-
options = DEFAULT_OPTIONS
45+
options: Partial<Options> = DEFAULT_OPTIONS
4646
): Promise<string> {
4747
const contents = Try(
4848
() => readFileSync(filename),
@@ -62,7 +62,7 @@ export function compileFromFile(
6262
export async function compile(
6363
schema: JSONSchema4,
6464
name: string,
65-
options = {}
65+
options: Partial<Options> = {}
6666
): Promise<string> {
6767

6868
const _options = { ...DEFAULT_OPTIONS, ...options }

0 commit comments

Comments
 (0)