From eb1da20678235f8c0b531560105bcb17d33a8db4 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 30 Mar 2022 12:04:00 -0700 Subject: [PATCH] Update types for TS 4.7 (#163) `Conf` requires `T` have a constraint of `Record`. In previous versions of TS, this error went undetected. --- source/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/types.ts b/source/types.ts index cafd278..21e77c3 100644 --- a/source/types.ts +++ b/source/types.ts @@ -3,7 +3,7 @@ import {JSONSchema as TypedJSONSchema} from 'json-schema-typed'; import Conf from '.'; import {EventEmitter} from 'events'; -export interface Options { +export interface Options> { /** Config used if there are no existing config. @@ -225,7 +225,7 @@ export interface Options { readonly configFileMode?: number; } -export type Migrations = Record) => void>; +export type Migrations> = Record) => void>; export type Schema = {[Property in keyof T]: ValueSchema}; export type ValueSchema = TypedJSONSchema;